mask = (predictions_3d != target_3d)
masked_preprocessed = np.ma.MaskedArray(self.processed_dsel[idx_neighbors, :], mask=mask)
competences_masked = np.mean(masked_preprocessed, axis=1)// Fill 0 to the masked values in the resulting array (when no neighbors belongs to the class predicted by// the corresponding base classifier)
competences = np.ma.filled(competences_masked, 0)