(self, strategy_name="QueryInstanceRandom", **kwargs)
return strategy
Return the query strategy object.

        Parameters
        ----------
        strategy_name: str, optional (default='QueryInstanceRandom')
            The name of a query strategy, should be one of
            the implemented methods.

        arg1, arg2, ...: dict, optional
            if kwargs is None,the pre-defined strategy will init in
            The args used in strategy.
            Note that, each parameters should be static.
            The parameters will be fed to the callable object automatically.

        Returns
        -------
        query_strategy: BaseQueryStrategy
            the query_strategy object.
Return the query strategy object.
Return the query strategy object .
def get_query_strategy(self, strategy_name="QueryInstanceRandom", **kwargs):
        """Return the query strategy object.

        Parameters
        ----------
        strategy_name: str, optional (default='QueryInstanceRandom')
            The name of a query strategy, should be one of
            the implemented methods.

        arg1, arg2, ...: dict, optional
            if kwargs is None,the pre-defined strategy will init in
            The args used in strategy.
            Note that, each parameters should be static.
            The parameters will be fed to the callable object automatically.

        Returns
        -------
        query_strategy: BaseQueryStrategy
            the query_strategy object.

        """
        try:
            exec("from .query_strategy import " + strategy_name)
        except:
            raise KeyError("Strategy " + strategy_name + " is not implemented in ALiPy.")
        strategy = None
        strategy = eval(strategy_name + "(X=self._X, y=self._y, **kwargs)")
        # print(strategy)
        return strategy
def get_query_strategy ( self , strategy_name = "QueryInstanceRandom" , * * kwargs ) : try : exec ( "from .query_strategy import " + strategy_name ) except : raise KeyError ( "Strategy " + strategy_name + " is not implemented in ALiPy." ) strategy = None strategy = eval ( strategy_name + "(X=self._X, y=self._y, **kwargs)" ) # print(strategy) return strategy