def select_by_prediction_mat(self, label_index, unlabel_index, predict, **kwargs):
    'Query from oracles. Return the index of selected instance and oracle.\n\n        Parameters\n        ----------\n        label_index: {list, np.ndarray, IndexCollection}\n            The indexes of labeled samples.\n\n        unlabel_index: {list, np.ndarray, IndexCollection}\n            The indexes of unlabeled samples.\n\n        predict: : 2d array, shape [n_samples, n_classes]\n            The probabilistic prediction matrix for the unlabeled set.\n\n        n_neighbors: int, optional (default=10)\n            How many neighbors of the selected instance will be used\n            to evaluate the oracles.\n\n        eval_cost: bool, optional (default=False)\n            To evaluate the cost of oracles or use the cost provided by oracles.\n\n        Returns\n        -------\n        selected_instance: int\n            The index of selected instance.\n\n        selected_oracle: int or str\n            The index of selected oracle.\n            If a list is given, the index of oracle will be returned.\n            If a Oracles object is given, the oracle name will be returned.\n        '
    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)
    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)
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.
def select_by_prediction_mat(self, label_index, unlabel_index, predict, **kwargs):
    'Query from oracles. Return the index of selected instance and oracle.\n\n        Parameters\n        ----------\n        label_index: {list, np.ndarray, IndexCollection}\n            The indexes of labeled samples.\n\n        unlabel_index: {list, np.ndarray, IndexCollection}\n            The indexes of unlabeled samples.\n\n        predict: : 2d array, shape [n_samples, n_classes]\n            The probabilistic prediction matrix for the unlabeled set.\n\n        n_neighbors: int, optional (default=10)\n            How many neighbors of the selected instance will be used\n            to evaluate the oracles.\n\n        eval_cost: bool, optional (default=False)\n            To evaluate the cost of oracles or use the cost provided by oracles.\n\n        Returns\n        -------\n        selected_instance: int\n            The index of selected instance.\n\n        selected_oracle: int or str\n            The index of selected oracle.\n            If a list is given, the index of oracle will be returned.\n            If a Oracles object is given, the oracle name will be returned.\n        '
    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)
    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)