def return_test_dataset(self):
        """Returns test data set

        Returns:
            X (numpy.ndarray): Features

            y (numpy.ndarray): Labels
        """
        if self.test_dataset['method'] == 'split_from_main':
            X, y = self.return_main_dataset()
            X, X_test, y, y_test = train_test_split(
                X,
                y,
                test_size=self.test_dataset['split_ratio'],
                random_state=self.test_dataset['split_seed'],
                stratify=y
            )

            return X_test, y_test

        if self.test_dataset['method'] == 'source':
            if 'source' not in self.test_dataset or not self.test_dataset['source']:
                raise exceptions.UserError('Source is empty')

            extraction_code = self.test_dataset["source"]
            extraction_function = functions.\
                import_object_from_string_code(extraction_code, "extract_test_dataset")
            X_test, y_test = extraction_function()

            return np.array(X_test), np.array(y_test)
def return_test_dataset ( self ) : if self . test_dataset [ 'method' ] == 'split_from_main' : X , y = self . return_main_dataset ( ) X , X_test , y , y_test = train_test_split ( X , y , test_size = self . test_dataset [ 'split_ratio' ] , random_state = self . test_dataset [ 'split_seed' ] , stratify = y ) return X_test , y_test if self . test_dataset [ 'method' ] == 'source' : if 'source' not in self . test_dataset or not self . test_dataset [ 'source' ] : raise exceptions . UserError ( 'Source is empty' ) extraction_code = self . test_dataset [ "source" ] extraction_function = functions . import_object_from_string_code ( extraction_code , "extract_test_dataset" ) X_test , y_test = extraction_function ( ) return np . array ( X_test ) , np . array ( y_test )
Returns test data set

        Returns:
            X (numpy.ndarray): Features

            y (numpy.ndarray): Labels