ruiking04 / CutAddPaste

CutAddPaste: Time Series Anomaly Detection by Exploiting Abnormal Knowledge
3 stars 1 forks source link

Hello, I would like to ask why this problem keeps occurring and there is no way to fix it #1

Open 123456789qwerfds opened 2 months ago

123456789qwerfds commented 2 months ago

Traceback (most recent call last): File "cutAddPaste.py", line 110, in train_dl, val_dl, test_dl, test_anomaly_window_num = data_generator(train_data, test_data, train_labels, File "/data/wxc/CutAddPaste-main/dataloader/dataset.py", line 83, in data_generator train_aug_x = cut_add_paste_outlier(train_origin, configs) File "/data/wxc/CutAddPaste-main/dataloader/generate_negative.py", line 162, in cut_add_paste_outlier cut_data[:, item] += slope ValueError: operands could not be broadcast together with shapes (8,) (16,) (8,)

ruiking04 commented 2 months ago

Thank you for following our work.

We set breakpoints and ran the program on the SWaT dataset but did not find the above problems. Below is a screenshot of the running program under debugging. This code means randomly selecting several dimensions in a multi-dimensional time series to add trend items. We guess it is a Numpy version problem, our version is v1.24.3.

1725959155046
ruiking04 commented 1 month ago

Sorry, we found the problem because we forgot to modify the WADI hyperparameters. According to the paper, it should be as follows:

self.features_len = 6
self.window_size = 32
self.time_step = 16

The source code has been updated.