diff --git a/adbench/datasets/data_generator.py b/adbench/datasets/data_generator.py index c4512f1..21595cf 100644 --- a/adbench/datasets/data_generator.py +++ b/adbench/datasets/data_generator.py @@ -33,7 +33,7 @@ def __init__(self, seed:int=42, dataset:str=None, test_size:float=0.3, self.n_samples_threshold = n_samples_threshold # dataset list - self.dataset_list_classical, self.dataset_list_cv, self.dataset_list_nlp = self.generate_dataset_list() + # self.dataset_list_classical, self.dataset_list_cv, self.dataset_list_nlp = self.generate_dataset_list() # myutils function self.utils = Utils() @@ -232,6 +232,8 @@ def generator(self, X=None, y=None, minmax=True, assert X is not None and y is not None, "For customized dataset, you should provide the X and y!" print('Testing on customized dataset...') else: + self.dataset_list_classical, self.dataset_list_cv, self.dataset_list_nlp = self.generate_dataset_list() + if self.dataset in self.dataset_list_classical: data = np.load(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'Classical', self.dataset + '.npz'), allow_pickle=True) elif self.dataset in self.dataset_list_cv: @@ -368,4 +370,4 @@ def generator(self, X=None, y=None, minmax=True, y_train[idx_unlabeled] = 0 y_train[idx_labeled_anomaly] = 1 - return {'X_train':X_train, 'y_train':y_train, 'X_test':X_test, 'y_test':y_test} \ No newline at end of file + return {'X_train':X_train, 'y_train':y_train, 'X_test':X_test, 'y_test':y_test}