diff --git a/pts/dataset/repository/datasets.py b/pts/dataset/repository/datasets.py index e173e6f..58cc7c9 100644 --- a/pts/dataset/repository/datasets.py +++ b/pts/dataset/repository/datasets.py @@ -133,6 +133,7 @@ def materialize_dataset( def get_dataset( dataset_name: str, path: Path = default_dataset_path, regenerate: bool = False, + shuffle: bool = True, ) -> TrainDatasets: """ Get a repository dataset. @@ -151,6 +152,8 @@ def get_dataset( be downloaded again. path where the dataset should be saved + shuffle + wheather to shuffle the training time series Returns ------- dataset obtained by either downloading or reloading from local file. @@ -161,6 +164,7 @@ def get_dataset( metadata=dataset_path / "metadata.json", train=dataset_path / "train" / "*.json", test=dataset_path / "test" / "*.json", + shuffle=shuffle ) diff --git a/pts/dataset/utils.py b/pts/dataset/utils.py index 5178a1d..f7e30c0 100644 --- a/pts/dataset/utils.py +++ b/pts/dataset/utils.py @@ -67,6 +67,8 @@ def load_datasets(metadata, train, test, shuffle: bool = False) -> TrainDatasets Path to the training dataset files. test Path to the test dataset files. + shuffle + Return shuffled train data. Returns ------- TrainDatasets