torch_timeseries.dataloader.SlidingWindowTS
- class SlidingWindowTS(dataset: TimeSeriesDataset, scaler: Scaler, time_enc=0, window: int = 168, horizon: int = 3, steps: int = 2, scale_in_train=False, shuffle_train=True, freq=None, batch_size: int = 32, train_ratio: float = 0.7, val_ratio: float = 0.2, num_worker: int = 3, uniform_eval=True, dtype=torch.float32)[source]
Bases:
objectClass for splitting the dataset sequentially and then randomly sampling from each subset.
- dataset
Time series dataset to be used.
- Type:
TimeSeriesDataset
- scaler
Scaler to normalize the data.
- Type:
Scaler
- dtype
Data type for the tensors.
- Type:
- 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