MCPcopy Create free account
hub / github.com/kwuking/TimeMixer / __init__

Method __init__

data_provider/data_loader.py:463–477  ·  view source on GitHub ↗
(self, root_path, win_size, step=1, flag="train")

Source from the content-addressed store, hash-verified

461
462class 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

Callers

nothing calls this directly

Calls 3

StandardScalerClass · 0.85
loadMethod · 0.80
transformMethod · 0.45

Tested by

no test coverage detected