(self, root_path, win_size, step=1, flag="train")
| 461 | |
| 462 | class SMAPSegLoader(Dataset): |
| 463 | def __init__(self, root_path, win_size, step=1, flag="train"): |
| 464 | self.flag = flag |
| 465 | self.step = step |
| 466 | self.win_size = win_size |
| 467 | self.scaler = StandardScaler() |
| 468 | data = np.load(os.path.join(root_path, "SMAP_train.npy")) |
| 469 | self.scaler.fit(data) |
| 470 | data = self.scaler.transform(data) |
| 471 | test_data = np.load(os.path.join(root_path, "SMAP_test.npy")) |
| 472 | self.test = self.scaler.transform(test_data) |
| 473 | self.train = data |
| 474 | self.val = self.test |
| 475 | self.test_labels = np.load(os.path.join(root_path, "SMAP_test_label.npy")) |
| 476 | print("test:", self.test.shape) |
| 477 | print("train:", self.train.shape) |
| 478 | |
| 479 | def __len__(self): |
| 480 |
nothing calls this directly
no test coverage detected