diff --git a/tods/tests/sk_interface/detection_algorithm/test_ski_AutoRegODetector.py b/tods/tests/sk_interface/detection_algorithm/test_ski_AutoRegODetector.py index 90b92c2..78b6bad 100644 --- a/tods/tests/sk_interface/detection_algorithm/test_ski_AutoRegODetector.py +++ b/tods/tests/sk_interface/detection_algorithm/test_ski_AutoRegODetector.py @@ -26,7 +26,6 @@ class AutoRegODetectorSKI_TestCase(unittest.TestCase): self.X_train, self.y_train, self.X_test, self.y_test = generate_data( n_train=self.n_train, n_test=self.n_test, contamination=self.contamination, random_state=42) - self.y_test = self.y_test[self.window_size:] self.y_train = self.y_train[self.window_size:] self.transformer = AutoRegODetectorSKI(contamination=self.contamination, window_size=self.window_size) diff --git a/tods/tests/sk_interface/detection_algorithm/test_ski_LSTMODetector.py b/tods/tests/sk_interface/detection_algorithm/test_ski_LSTMODetector.py index bfe11df..4c38131 100644 --- a/tods/tests/sk_interface/detection_algorithm/test_ski_LSTMODetector.py +++ b/tods/tests/sk_interface/detection_algorithm/test_ski_LSTMODetector.py @@ -26,7 +26,7 @@ class LSTMODetectorSKI_TestCase(unittest.TestCase): n_train=self.n_train, n_test=self.n_test, contamination=self.contamination, random_state=42) - self.y_test = self.y_test[1:] + #self.y_test = self.y_test[1:] self.y_train = self.y_train[1:] diff --git a/tods/tests/sk_interface/detection_algorithm/test_ski_PCAODetector.py b/tods/tests/sk_interface/detection_algorithm/test_ski_PCAODetector.py index 6a1127d..723aa80 100644 --- a/tods/tests/sk_interface/detection_algorithm/test_ski_PCAODetector.py +++ b/tods/tests/sk_interface/detection_algorithm/test_ski_PCAODetector.py @@ -22,11 +22,14 @@ class PCAODetectorSKI_TestCase(unittest.TestCase): self.n_test = 100 self.contamination = 0.1 self.roc_floor = 0.0 + self.window_size = 5 self.X_train, self.y_train, self.X_test, self.y_test = generate_data( n_train=self.n_train, n_test=self.n_test, contamination=self.contamination, random_state=42) - self.transformer = PCAODetectorSKI(contamination=self.contamination) + + self.transformer = PCAODetectorSKI(contamination=self.contamination, window_size=self.window_size) + self.y_test = self.y_test[self.window_size-1:] self.transformer.fit(self.X_train) def test_prediction_labels(self):