(self, iteration=None)
return copy.copy(self.train_idx), copy.copy(self.test_idx), copy.deepcopy(work_L), copy.deepcopy(work_U)
Recover workspace after $iteration$ querying.
        For example, if 0 is given, the initial workspace without any querying will be recovered.
        Note that, the object itself will be recovered, the information after the iteration will be discarded.

        Parameters
        ----------
        iteration: int, optional(default=None)
            Number of iteration to recover, start from 0.
            If nothing given, it will return the current workspace.

        Returns
        -------
        train_idx: list
            Index of training set, shape like [n_training_samples]

        test_idx: list
            Index of testing set, shape like [n_testing_samples]

        label_idx: list
            Index of labeling set, shape like [n_labeling_samples]

        unlabel_idx: list
            Index of unlabeling set, shape like [n_unlabeling_samples]
Recover workspace after $iteration$ querying.
        For example, if 0 is given, the initial workspace without any querying will be recovered.
        Note that, the object itself will be recovered, the information after the iteration will be discarded.
Recover workspace after $iteration$ querying . For example if 0 is given the initial workspace without any querying will be recovered . Note that the object itself will be recovered the information after the iteration will be discarded .
def recover_workspace(self, iteration=None):
        """Recover workspace after $iteration$ querying.
        For example, if 0 is given, the initial workspace without any querying will be recovered.
        Note that, the object itself will be recovered, the information after the iteration will be discarded.

        Parameters
        ----------
        iteration: int, optional(default=None)
            Number of iteration to recover, start from 0.
            If nothing given, it will return the current workspace.

        Returns
        -------
        train_idx: list
            Index of training set, shape like [n_training_samples]

        test_idx: list
            Index of testing set, shape like [n_testing_samples]

        label_idx: list
            Index of labeling set, shape like [n_labeling_samples]

        unlabel_idx: list
            Index of unlabeling set, shape like [n_unlabeling_samples]
        """
        if iteration is None:
            iteration = len(self.__state_list)
        assert (0 <= iteration <= len(self))
        work_U = copy.deepcopy(self.init_U)
        work_L = copy.deepcopy(self.init_L)
        for i in range(iteration):
            state = self.__state_list[i]
            work_U.difference_update(state.get_value('select_index'))
            work_L.update(state.get_value('select_index'))
        self.__state_list = self.__state_list[0:iteration]
        return copy.copy(self.train_idx), copy.copy(self.test_idx), copy.deepcopy(work_L), copy.deepcopy(work_U)
def recover_workspace ( self , iteration = None ) : if iteration is None : iteration = len ( self . __state_list ) assert ( 0 <= iteration <= len ( self ) ) work_U = copy . deepcopy ( self . init_U ) work_L = copy . deepcopy ( self . init_L ) for i in range ( iteration ) : state = self . __state_list [ i ] work_U . difference_update ( state . get_value ( 'select_index' ) ) work_L . update ( state . get_value ( 'select_index' ) ) self . __state_list = self . __state_list [ 0 : iteration ] return copy . copy ( self . train_idx ) , copy . copy ( self . test_idx ) , copy . deepcopy ( work_L ) , copy . deepcopy ( work_U )