(self, multi_thread=True, **kwargs)
Start the active learning main loop
        If using implemented query strategy, It will run in multi-thread default.

        Parameters
        ----------
        multi_thread: bool, optional (default=True)
            Decide whether to run in multi-thread.
            if multi thread is True,it will run in multi-thread way.
            if not,it will be executed sequentially.

        kwargs: set, optional
            The parameters will use in aceThreading init or stateio init.
            if the kwargs is None,it will init in the default way.

            if multi_thread is True,the kwargs will be used for aceThreading init,
            aceThreading(A class implement multi-threading in active learning for multiple 
            random splits experiments.)
            and you can see the specific parameter settings in alipy/utils/'multi_thread.py' init().

            if not,the kwargs will be used for stateio init,
            stateio(A class to store states.)
            and you can see the specific parameter settings in alipy/experiment/'state_io.py' init().
            
            Note that, each parameters should be static.
Start the active learning main loop
        If using implemented query strategy, It will run in multi-thread default.
Start the active learning main loop If using implemented query strategy It will run in multi - thread default .
def start_query(self, multi_thread=True, **kwargs):
        """Start the active learning main loop
        If using implemented query strategy, It will run in multi-thread default.

        Parameters
        ----------
        multi_thread: bool, optional (default=True)
            Decide whether to run in multi-thread.
            if multi thread is True,it will run in multi-thread way.
            if not,it will be executed sequentially.

        kwargs: set, optional
            The parameters will use in aceThreading init or stateio init.
            if the kwargs is None,it will init in the default way.

            if multi_thread is True,the kwargs will be used for aceThreading init,
            aceThreading(A class implement multi-threading in active learning for multiple 
            random splits experiments.)
            and you can see the specific parameter settings in alipy/utils/'multi_thread.py' init().

            if not,the kwargs will be used for stateio init,
            stateio(A class to store states.)
            and you can see the specific parameter settings in alipy/experiment/'state_io.py' init().
            
            Note that, each parameters should be static.
        """
        if not self._split:
            raise Exception("Data split is unknown. Use set_data_split() to set an existed split, "
                            "or use split_AL() to generate new split.")
        if not self._metrics:
            raise Exception("Performance_Metrics is unknown."
                            " Use set_performance_metric() to define a performance_metrics.")

        if multi_thread:
            max_thread = kwargs.pop('max_thread', None)
            refresh_interval = kwargs.pop('refresh_interval', 1.0)
            saving_path = kwargs.pop('saving_path', '.')
            ace = aceThreading(self._X, self._y, self._train_idx, self._test_idx,
                               self._label_idx, self._unlabel_idx, max_thread=max_thread,
                               refresh_interval=refresh_interval, saving_path=saving_path)
            ace.set_target_function(self.__al_main_loop)
            ace.start_all_threads()
            self._experiment_result = ace.get_results()
        else:
            initial_point = kwargs.pop('initial_point', None)
            saving_path = kwargs.pop('saving_path', None)
            check_flag = kwargs.pop('check_flag', True)
            verbose = kwargs.pop('verbose', True)
            print_interval = kwargs.pop('print_interval', 1)
            for round in range(self._split_count):
                saver = StateIO(round, self._train_idx[round], self._test_idx[round], self._label_idx[round],
                                self._unlabel_idx[round], initial_point, saving_path, check_flag, verbose,
                                print_interval)
                self.__al_main_loop(round, self._train_idx[round], self._test_idx[round], self._label_idx[round],
                                    self._unlabel_idx[round], saver)
                self._experiment_result.append(copy.deepcopy(saver))
def start_query ( self , multi_thread = True , * * kwargs ) : if not self . _split : raise Exception ( "Data split is unknown. Use set_data_split() to set an existed split, " "or use split_AL() to generate new split." ) if not self . _metrics : raise Exception ( "Performance_Metrics is unknown." " Use set_performance_metric() to define a performance_metrics." ) if multi_thread : max_thread = kwargs . pop ( 'max_thread' , None ) refresh_interval = kwargs . pop ( 'refresh_interval' , 1.0 ) saving_path = kwargs . pop ( 'saving_path' , '.' ) ace = aceThreading ( self . _X , self . _y , self . _train_idx , self . _test_idx , self . _label_idx , self . _unlabel_idx , max_thread = max_thread , refresh_interval = refresh_interval , saving_path = saving_path ) ace . set_target_function ( self . __al_main_loop ) ace . start_all_threads ( ) self . _experiment_result = ace . get_results ( ) else : initial_point = kwargs . pop ( 'initial_point' , None ) saving_path = kwargs . pop ( 'saving_path' , None ) check_flag = kwargs . pop ( 'check_flag' , True ) verbose = kwargs . pop ( 'verbose' , True ) print_interval = kwargs . pop ( 'print_interval' , 1 ) for round in range ( self . _split_count ) : saver = StateIO ( round , self . _train_idx [ round ] , self . _test_idx [ round ] , self . _label_idx [ round ] , self . _unlabel_idx [ round ] , initial_point , saving_path , check_flag , verbose , print_interval ) self . __al_main_loop ( round , self . _train_idx [ round ] , self . _test_idx [ round ] , self . _label_idx [ round ] , self . _unlabel_idx [ round ] , saver ) self . _experiment_result . append ( copy . deepcopy ( saver ) )