(self, label_index, unlabel_index, predict, **kwargs)
return [unlabel_index[selected_pair[1]]], sel_ora
Query from oracles. Return the index of selected instance and oracle.

        Parameters
        ----------
        label_index: {list, np.ndarray, IndexCollection}
            The indexes of labeled samples.

        unlabel_index: {list, np.ndarray, IndexCollection}
            The indexes of unlabeled samples.

        predict: : 2d array, shape [n_samples, n_classes]
            The probabilistic prediction matrix for the unlabeled set.

        n_neighbors: int, optional (default=10)
            How many neighbors of the selected instance will be used
            to evaluate the oracles.

        eval_cost: bool, optional (default=False)
            To evaluate the cost of oracles or use the cost provided by oracles.

        Returns
        -------
        selected_instance: int
            The index of selected instance.

        selected_oracle: int or str
            The index of selected oracle.
            If a list is given, the index of oracle will be returned.
            If a Oracles object is given, the oracle name will be returned.
Query from oracles. Return the index of selected instance and oracle.
Query from oracles . Return the index of selected instance and oracle .
def select_by_prediction_mat(self, label_index, unlabel_index, predict, **kwargs):
        """Query from oracles. Return the index of selected instance and oracle.

        Parameters
        ----------
        label_index: {list, np.ndarray, IndexCollection}
            The indexes of labeled samples.

        unlabel_index: {list, np.ndarray, IndexCollection}
            The indexes of unlabeled samples.

        predict: : 2d array, shape [n_samples, n_classes]
            The probabilistic prediction matrix for the unlabeled set.

        n_neighbors: int, optional (default=10)
            How many neighbors of the selected instance will be used
            to evaluate the oracles.

        eval_cost: bool, optional (default=False)
            To evaluate the cost of oracles or use the cost provided by oracles.

        Returns
        -------
        selected_instance: int
            The index of selected instance.

        selected_oracle: int or str
            The index of selected oracle.
            If a list is given, the index of oracle will be returned.
            If a Oracles object is given, the oracle name will be returned.
        """
        n_neighbors = min(kwargs.pop('n_neighbors', 10), len(self._ini_ind)-1)
        eval_cost = kwargs.pop('n_neighbors', False)
        Q_table, oracle_ind_name_dict = self._calc_Q_table(label_index, unlabel_index, self._oracles, predict,
                                                           n_neighbors=n_neighbors, eval_cost=eval_cost)
        # get the instance-oracle pair
        selected_pair = np.unravel_index(np.argmax(Q_table, axis=None), Q_table.shape)
        sel_ora = oracle_ind_name_dict[selected_pair[0]]
        if not isinstance(sel_ora, list):
            sel_ora = [sel_ora]
        return [unlabel_index[selected_pair[1]]], sel_ora
def select_by_prediction_mat ( self , label_index , unlabel_index , predict , * * kwargs ) : n_neighbors = min ( kwargs . pop ( 'n_neighbors' , 10 ) , len ( self . _ini_ind ) - 1 ) eval_cost = kwargs . pop ( 'n_neighbors' , False ) Q_table , oracle_ind_name_dict = self . _calc_Q_table ( label_index , unlabel_index , self . _oracles , predict , n_neighbors = n_neighbors , eval_cost = eval_cost ) # get the instance-oracle pair selected_pair = np . unravel_index ( np . argmax ( Q_table , axis = None ) , Q_table . shape ) sel_ora = oracle_ind_name_dict [ selected_pair [ 0 ] ] if not isinstance ( sel_ora , list ) : sel_ora = [ sel_ora ] return [ unlabel_index [ selected_pair [ 1 ] ] ] , sel_ora