(selected_instance, oracles, names=None)
return labeling_results, costs
Get the query results from oracles of the selected instance.

        Parameters
        ----------
        selected_instance: int
            The indexes of selected samples. Should be a member of unlabeled set.

        oracles: {list, alipy.oracle.Oracles}
            An alipy.oracle.Oracle object that contains all the
            available oracles or a list of oracles.
            Each oracle should be a alipy.oracle.Oracle object.

        names: list, optional (default=None)
            A list of str which contains the names of oracles to query from.
            If not provided, it will query from all oracles.
            Each name should in oracles.names().

        Returns
        -------
        query_labels: list
            The queried labels.

        query_costs: list
            The total cost of query.
Get the query results from oracles of the selected instance.
Get the query results from oracles of the selected instance .
def get_query_results(selected_instance, oracles, names=None):
        """Get the query results from oracles of the selected instance.

        Parameters
        ----------
        selected_instance: int
            The indexes of selected samples. Should be a member of unlabeled set.

        oracles: {list, alipy.oracle.Oracles}
            An alipy.oracle.Oracle object that contains all the
            available oracles or a list of oracles.
            Each oracle should be a alipy.oracle.Oracle object.

        names: list, optional (default=None)
            A list of str which contains the names of oracles to query from.
            If not provided, it will query from all oracles.
            Each name should in oracles.names().

        Returns
        -------
        query_labels: list
            The queried labels.

        query_costs: list
            The total cost of query.
        """
        costs = []
        if isinstance(oracles, list):
            oracle_type = 'list'
            for oracle in oracles:
                assert isinstance(oracle, Oracle)
        elif isinstance(oracles, Oracles):
            oracle_type = 'oracles'
        else:
            raise TypeError("The type of parameter oracles must be a list or alipy.oracle.Oracles object.")
        labeling_results = []
        if oracle_type == 'list':
            for i in oracles.names() if oracle_type == 'oracles' else range(len(oracles)):
                lab, co = oracles[i].query_by_index(selected_instance)
                labeling_results.append(lab[0])
                costs.append(np.sum(co))
        else:
            results = oracles.query_from_s(selected_instance, oracles_name=names)
            labeling_results = [res[0][0] for res in results]
            costs = [np.sum(res[1]) for res in results]
        return labeling_results, costs
def get_query_results ( selected_instance , oracles , names = None ) : costs = [ ] if isinstance ( oracles , list ) : oracle_type = 'list' for oracle in oracles : assert isinstance ( oracle , Oracle ) elif isinstance ( oracles , Oracles ) : oracle_type = 'oracles' else : raise TypeError ( "The type of parameter oracles must be a list or alipy.oracle.Oracles object." ) labeling_results = [ ] if oracle_type == 'list' : for i in oracles . names ( ) if oracle_type == 'oracles' else range ( len ( oracles ) ) : lab , co = oracles [ i ] . query_by_index ( selected_instance ) labeling_results . append ( lab [ 0 ] ) costs . append ( np . sum ( co ) ) else : results = oracles . query_from_s ( selected_instance , oracles_name = names ) labeling_results = [ res [ 0 ] [ 0 ] for res in results ] costs = [ np . sum ( res [ 1 ] ) for res in results ] return labeling_results , costs