def select_by_prediction_mat(self, label_index, unlabel_index, predict):
    '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        Returns\n        -------\n        selected_instance: int\n            The index of selected instance. Selected by uncertainty.\n\n        selected_oracles: list\n            The selected oracles for querying.\n        '
    assert isinstance(unlabel_index, collections.Iterable)
    assert isinstance(label_index, collections.Iterable)
    unlabel_index = np.asarray(unlabel_index)
    label_index = np.asarray(label_index)
    if (len(unlabel_index) <= 1):
        return unlabel_index
    unc = QueryInstanceUncertainty(measure='least_confident')
    selected_instance = unc.select_by_prediction_mat(unlabel_index=unlabel_index, predict=predict, batch_size=1)[0]
    return ([selected_instance], self.select_by_given_instance(selected_instance))
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.

Returns
-------
selected_instance: int
    The index of selected instance. Selected by uncertainty.

selected_oracles: list
    The selected oracles for querying.
def select_by_prediction_mat(self, label_index, unlabel_index, predict):
    '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        Returns\n        -------\n        selected_instance: int\n            The index of selected instance. Selected by uncertainty.\n\n        selected_oracles: list\n            The selected oracles for querying.\n        '
    assert isinstance(unlabel_index, collections.Iterable)
    assert isinstance(label_index, collections.Iterable)
    unlabel_index = np.asarray(unlabel_index)
    label_index = np.asarray(label_index)
    if (len(unlabel_index) <= 1):
        return unlabel_index
    unc = QueryInstanceUncertainty(measure='least_confident')
    selected_instance = unc.select_by_prediction_mat(unlabel_index=unlabel_index, predict=predict, batch_size=1)[0]
    return ([selected_instance], self.select_by_given_instance(selected_instance))