-------
indices : the indices of the selected base classifiers
indices = [idx for idx, _ in enumerate(competences) if competences[idx] > self.gamma]
// if no classifier was selected, use the whole pool
if len(indices) == 0:
indices = list(range(self.n_classifiers))
return indices
def estimate_competence(self, query, predictions=None):
Estimate the competence of each base classifier :math:`c_i`
After Change
selected_classifiers = (competences > self.selection_threshold)
// For the rows that are all False (i.e., no base classifier was selected, select all classifiers (all True)
selected_classifiers[~np.any(selected_classifiers, axis=1), :] = True
return selected_classifiers
def estimate_competence(self, query, predictions):