(self, test_ratio=0.3, initial_label_rate=0.05,
                 split_count=10, all_class=True)
return self.train_idx, self.test_idx, self.label_idx, self.unlabel_idx
split dataset for active learning experiment.
        The labeled set for multi-label setting is fully labeled.

        Parameters
        ----------
        test_ratio: float, optional (default=0.3)
            ratio of test set

        initial_label_rate: float, optional (default=0.05)
            ratio of initial label set or the existed features (missing rate = 1-initial_label_rate)
            e.g. initial_labelset*(1-test_ratio)*n_samples

        split_count: int, optional (default=10)
            random split data _split_count times

        all_class: bool, optional (default=True)
            whether each split will contain at least one instance for each class.
            If False, a totally random split will be performed.

        Returns
        -------
        train_idx: list
            index of training set, shape like [n_split_count, n_training_indexes]

        test_idx: list
            index of testing set, shape like [n_split_count, n_testing_indexes]

        label_idx: list
            index of labeling set, shape like [n_split_count, n_labeling_indexes]

        unlabel_idx: list
            index of unlabeling set, shape like [n_split_count, n_unlabeling_indexes]
split dataset for active learning experiment.
        The labeled set for multi-label setting is fully labeled.
split dataset for active learning experiment . The labeled set for multi - label setting is fully labeled .
def split_AL(self, test_ratio=0.3, initial_label_rate=0.05,
                 split_count=10, all_class=True):
        """split dataset for active learning experiment.
        The labeled set for multi-label setting is fully labeled.

        Parameters
        ----------
        test_ratio: float, optional (default=0.3)
            ratio of test set

        initial_label_rate: float, optional (default=0.05)
            ratio of initial label set or the existed features (missing rate = 1-initial_label_rate)
            e.g. initial_labelset*(1-test_ratio)*n_samples

        split_count: int, optional (default=10)
            random split data _split_count times

        all_class: bool, optional (default=True)
            whether each split will contain at least one instance for each class.
            If False, a totally random split will be performed.

        Returns
        -------
        train_idx: list
            index of training set, shape like [n_split_count, n_training_indexes]

        test_idx: list
            index of testing set, shape like [n_split_count, n_testing_indexes]

        label_idx: list
            index of labeling set, shape like [n_split_count, n_labeling_indexes]

        unlabel_idx: list
            index of unlabeling set, shape like [n_split_count, n_unlabeling_indexes]

        """
        # should support other query types in the future
        if self._split is True:
            warnings.warn("Data has already been split. Return the existed split in case of overwriting.",
                          category=RuntimeWarning)
            return self.train_idx, self.test_idx, self.label_idx, self.unlabel_idx

        self.split_count = split_count
        if self._target_type != 'Features':
            if self._target_type != 'multilabel':
                self.train_idx, self.test_idx, self.label_idx, self.unlabel_idx = split(
                    X=self._X if self._instance_flag else None,
                    y=self._y,
                    query_type=self.query_type, test_ratio=test_ratio,
                    initial_label_rate=initial_label_rate,
                    split_count=split_count,
                    instance_indexes=self._indexes,
                    all_class=all_class,
                    saving_path=self._saving_path)
            else:
                self.train_idx, self.test_idx, self.label_idx, self.unlabel_idx = split_multi_label(
                    y=self._y,
                    label_shape=self._y.shape,
                    test_ratio=test_ratio,
                    initial_label_rate=initial_label_rate,
                    split_count=split_count,
                    all_class=all_class,
                    saving_path=self._saving_path
                )
        else:
            self.train_idx, self.test_idx, self.label_idx, self.unlabel_idx = split_features(
                feature_matrix=self._X,
                test_ratio=test_ratio,
                missing_rate=1 - initial_label_rate,
                split_count=split_count,
                all_features=all_class,
                saving_path=self._saving_path
            )
        self._split = True
        self.save()
        return self.train_idx, self.test_idx, self.label_idx, self.unlabel_idx
def split_AL ( self , test_ratio = 0.3 , initial_label_rate = 0.05 , split_count = 10 , all_class = True ) : # should support other query types in the future if self . _split is True : warnings . warn ( "Data has already been split. Return the existed split in case of overwriting." , category = RuntimeWarning ) return self . train_idx , self . test_idx , self . label_idx , self . unlabel_idx self . split_count = split_count if self . _target_type != 'Features' : if self . _target_type != 'multilabel' : self . train_idx , self . test_idx , self . label_idx , self . unlabel_idx = split ( X = self . _X if self . _instance_flag else None , y = self . _y , query_type = self . query_type , test_ratio = test_ratio , initial_label_rate = initial_label_rate , split_count = split_count , instance_indexes = self . _indexes , all_class = all_class , saving_path = self . _saving_path ) else : self . train_idx , self . test_idx , self . label_idx , self . unlabel_idx = split_multi_label ( y = self . _y , label_shape = self . _y . shape , test_ratio = test_ratio , initial_label_rate = initial_label_rate , split_count = split_count , all_class = all_class , saving_path = self . _saving_path ) else : self . train_idx , self . test_idx , self . label_idx , self . unlabel_idx = split_features ( feature_matrix = self . _X , test_ratio = test_ratio , missing_rate = 1 - initial_label_rate , split_count = split_count , all_features = all_class , saving_path = self . _saving_path ) self . _split = True self . save ( ) return self . train_idx , self . test_idx , self . label_idx , self . unlabel_idx