The competence level estimated for each base classifier
dists, idx_neighbors = self._get_region_competence(query)
idx_neighbors = np.atleast_2d(idx_neighbors)
dists = np.atleast_2d(dists)
dists_normalized = 1.0/dists
// Get the ndarray containing the scores obtained for the correct class for each neighbor (and test sample)
scores_target_class = self.dsel_scores[idx_neighbors, :, self.DSEL_target[idx_neighbors]]
// Multiply the scores obtained for the correct class to the distances of each corresponding neighbor
scores_target_class *= np.expand_dims(dists_normalized, axis=2)
// Sum the scores obtained for each neighbor and divide by the sum of all distances
competences = np.sum(scores_target_class, axis=1)/ np.sum(dists_normalized, axis=1)