(self, queried_examples)
return self.query_by_index(q_id)
Query function, query information giving an instance.
        Note that, this function only available if initializes with
        data matrix.

        Parameters
        ----------
        queried_examples: array_like
            [n_samples, n_features]

        Returns
        -------
        sup_info: list
            supervised information of queried instance.

        costs: list
            corresponding costs produced by query.
Query function, query information giving an instance.
        Note that, this function only available if initializes with
        data matrix.
Query function query information giving an instance . Note that this function only available if initializes with data matrix .
def query_by_example(self, queried_examples):
        """Query function, query information giving an instance.
        Note that, this function only available if initializes with
        data matrix.

        Parameters
        ----------
        queried_examples: array_like
            [n_samples, n_features]

        Returns
        -------
        sup_info: list
            supervised information of queried instance.

        costs: list
            corresponding costs produced by query.
        """
        if not self._instance_flag:
            raise Exception("This oracle do not have the instance information, query_by_instance is not supported")
        if not isinstance(queried_examples, (list, np.ndarray)):
            raise TypeError("An list or numpy.ndarray is expected, but received:%s" % str(type(queried_examples)))
        if len(np.shape(queried_examples)) == 1:
            queried_examples = [queried_examples]
        q_id = []
        for k in queried_examples:
            k = tuple(k)
            if k in self._exa2ind.keys():
                q_id.append(self._exa2ind[k])
            else:
                self._do_missing(k, 'instance pool')
        return self.query_by_index(q_id)
def query_by_example ( self , queried_examples ) : if not self . _instance_flag : raise Exception ( "This oracle do not have the instance information, query_by_instance is not supported" ) if not isinstance ( queried_examples , ( list , np . ndarray ) ) : raise TypeError ( "An list or numpy.ndarray is expected, but received:%s" % str ( type ( queried_examples ) ) ) if len ( np . shape ( queried_examples ) ) == 1 : queried_examples = [ queried_examples ] q_id = [ ] for k in queried_examples : k = tuple ( k ) if k in self . _exa2ind . keys ( ) : q_id . append ( self . _exa2ind [ k ] ) else : self . _do_missing ( k , 'instance pool' ) return self . query_by_index ( q_id )