torch_timeseries.dataloader.SlidingWindowTS
- class SlidingWindowTS(dataset: TimeSeriesDataset, scaler: Scaler, time_enc=1, window: int = 168, horizon: int = 1, steps: int = 2, scale_in_train=True, shuffle_train=True, freq=None, batch_size: int = 32, train_ratio: float = 0.7, test_ratio: float = 0.2, val_ratio: float | None = None, num_worker: int = 3, uniform_eval=True, single_variate=False, fast_train=False, fast_val=False, fast_test=False, include_raw=True, time_index=False)[source]
Bases:
objectClass for splitting the dataset sequentially and then randomly sampling from each subset.
time_index: with two addtional values of time index, (…, x_index, y_index)
- dataset
Time series dataset to be used.
- Type:
TimeSeriesDataset
- scaler
Scaler to normalize the data.
- Type:
Scaler
- train_loader
DataLoader for the training data.
- Type:
DataLoader
- val_loader
DataLoader for the validation data.
- Type:
DataLoader
- test_loader
DataLoader for the test data.
- Type:
DataLoader