acds.benchmarks package
Subpackages
Submodules
acds.benchmarks.cifar10 module
- acds.benchmarks.cifar10.get_cifar10_data(root: PathLike, bs_train: int, bs_test: int, valid_perc: int = 10, grayscale: bool = False)[source]
Get the CIFAR-10 dataset and return the train, validation and test dataloaders.
- Parameters:
root (os.PathLike) – Path to the folder containing the CIFAR-10 dataset.
bs_train (int) – Batch size for the train dataloader.
bs_test (int) – Batch size for the validation and test dataloaders.
valid_perc (int) – Percentage of the train dataset to use for validation. Defaults to 10.
grayscale (bool) – If True, convert the images to grayscale. Default to False.
acds.benchmarks.libras module
- acds.benchmarks.libras.get_libras_data(bs_train: int, bs_test: int, whole_train: bool = False) tuple[DataLoader, DataLoader, DataLoader][source]
Get the Libras dataset from time series classification website and return the train, validation and test dataloaders.
- Parameters:
bs_train (int) – Batch size for the train dataloader.
bs_test (int) – Batch size for the validation and test dataloaders.
whole_train (bool, optional) – If True, the whole dataset is used for training. Defaults to False.
- Returns:
Train, validation and test dataloaders.
- Return type:
Tuple[DataLoader, DataLoader, DataLoader]
acds.benchmarks.mackey_glass module
- acds.benchmarks.mackey_glass.get_mackey_glass(csvfolder: PathLike, lag=84, washout=200)[source]
Get the Mackey-Glass dataset and return the train, validation and test datasets as torch tensors.
- Parameters:
csvfolder (os.PathLike) – Path to the directory containing the mackey_glass.csv file.
lag (int, optional) – Number of time steps to look back. Defaults to 84.
washout (int, optional) – Number of time steps to discard. Defaults to 200.
- Returns:
Train, validation and test datasets.
- Return type:
Tuple[Tuple[torch.Tensor, torch.Tensor], Tuple[torch.Tensor, torch.Tensor], Tuple[torch.Tensor, torch.Tensor]]
acds.benchmarks.mallat module
- acds.benchmarks.mallat.get_mallat_data(bs_train: int, bs_test: int, whole_train: bool = False) tuple[DataLoader, DataLoader, DataLoader][source]
Get the Mallat dataset from time series classification website and return the train, validation and test dataloaders.
- Parameters:
bs_train (int) – Batch size for the train dataloader.
bs_test (int) – Batch size for the validation and test dataloaders.
whole_train (bool, optional) – If True, the whole dataset is used for training. Defaults to False.
- Returns:
Train, validation and test dataloaders.
- Return type:
Tuple[DataLoader, DataLoader, DataLoader]
acds.benchmarks.mnist module
- acds.benchmarks.mnist.get_mnist_data(root: PathLike, bs_train: int, bs_test: int, valid_perc: int = 10, permuted: bool = False)[source]
Get the MNIST dataset and return the train, validation and test dataloaders.
- Parameters:
root (os.PathLike) – Path to the folder containing the MNIST dataset.
bs_train (int) – Batch size for the train dataloader.
bs_test (int) – Batch size for the validation and test dataloaders.
valid_perc (int) – Percentage of the train dataset to use for validation. Defaults to 10.
permuted (bool) – Whether to apply permutation to images.
acds.benchmarks.rc_dataset module
acds.benchmarks.touchsensor module
acds.benchmarks.trace module
- acds.benchmarks.trace.get_trace_data(bs_train: int, bs_test: int, whole_train: bool = False) tuple[DataLoader, DataLoader, DataLoader][source]
Get the Trace dataset from time series classification website and return the train, validation and test dataloaders.
- Parameters:
bs_train (int) – Batch size for the train dataloader.
bs_test (int) – Batch size for the validation and test dataloaders.
whole_train (bool, optional) – If True, the whole dataset is used for training. Defaults to False.
- Returns:
Train, validation and test dataloaders.
- Return type:
Tuple[DataLoader, DataLoader, DataLoader]
Module contents
- acds.benchmarks.get_adiac_data(root_path: PathLike, bs_train: int, bs_test: int, whole_train: bool = False, for_rc: bool = True) tuple[DataLoader, DataLoader, DataLoader][source]
Get the ADIAC dataset from a txt file and return the train, validation and test dataloaders.
- Parameters:
root_path (os.PathLike) – Path to the folder containing the txt files.
bs_train (int) – Batch size for the train dataloader.
bs_test (int) – Batch size for the validation and test dataloaders.
whole_train (bool, optional) – If True, the whole dataset is used for training. Defaults to False.
for_rc (bool, optional) – If True, the data is returned as a RCDataset. Defaults to True.
- Returns:
Train, validation and test dataloaders.
- Return type:
Tuple[DataLoader, DataLoader, DataLoader]
- acds.benchmarks.get_cifar10_data(root: PathLike, bs_train: int, bs_test: int, valid_perc: int = 10, grayscale: bool = False)[source]
Get the CIFAR-10 dataset and return the train, validation and test dataloaders.
- Parameters:
root (os.PathLike) – Path to the folder containing the CIFAR-10 dataset.
bs_train (int) – Batch size for the train dataloader.
bs_test (int) – Batch size for the validation and test dataloaders.
valid_perc (int) – Percentage of the train dataset to use for validation. Defaults to 10.
grayscale (bool) – If True, convert the images to grayscale. Default to False.
- acds.benchmarks.get_libras_data(bs_train: int, bs_test: int, whole_train: bool = False) tuple[DataLoader, DataLoader, DataLoader][source]
Get the Libras dataset from time series classification website and return the train, validation and test dataloaders.
- Parameters:
bs_train (int) – Batch size for the train dataloader.
bs_test (int) – Batch size for the validation and test dataloaders.
whole_train (bool, optional) – If True, the whole dataset is used for training. Defaults to False.
- Returns:
Train, validation and test dataloaders.
- Return type:
Tuple[DataLoader, DataLoader, DataLoader]
- acds.benchmarks.get_mackey_glass(csvfolder: PathLike, lag=84, washout=200)[source]
Get the Mackey-Glass dataset and return the train, validation and test datasets as torch tensors.
- Parameters:
csvfolder (os.PathLike) – Path to the directory containing the mackey_glass.csv file.
lag (int, optional) – Number of time steps to look back. Defaults to 84.
washout (int, optional) – Number of time steps to discard. Defaults to 200.
- Returns:
Train, validation and test datasets.
- Return type:
Tuple[Tuple[torch.Tensor, torch.Tensor], Tuple[torch.Tensor, torch.Tensor], Tuple[torch.Tensor, torch.Tensor]]
- acds.benchmarks.get_mackey_glass_windows(csvfolder: PathLike, chunk_length, prediction_lag=84, tr_bs=10)[source]
- acds.benchmarks.get_mallat_data(bs_train: int, bs_test: int, whole_train: bool = False) tuple[DataLoader, DataLoader, DataLoader][source]
Get the Mallat dataset from time series classification website and return the train, validation and test dataloaders.
- Parameters:
bs_train (int) – Batch size for the train dataloader.
bs_test (int) – Batch size for the validation and test dataloaders.
whole_train (bool, optional) – If True, the whole dataset is used for training. Defaults to False.
- Returns:
Train, validation and test dataloaders.
- Return type:
Tuple[DataLoader, DataLoader, DataLoader]
- acds.benchmarks.get_mnist_data(root: PathLike, bs_train: int, bs_test: int, valid_perc: int = 10, permuted: bool = False)[source]
Get the MNIST dataset and return the train, validation and test dataloaders.
- Parameters:
root (os.PathLike) – Path to the folder containing the MNIST dataset.
bs_train (int) – Batch size for the train dataloader.
bs_test (int) – Batch size for the validation and test dataloaders.
valid_perc (int) – Percentage of the train dataset to use for validation. Defaults to 10.
permuted (bool) – Whether to apply permutation to images.
- acds.benchmarks.get_trace_data(bs_train: int, bs_test: int, whole_train: bool = False) tuple[DataLoader, DataLoader, DataLoader][source]
Get the Trace dataset from time series classification website and return the train, validation and test dataloaders.
- Parameters:
bs_train (int) – Batch size for the train dataloader.
bs_test (int) – Batch size for the validation and test dataloaders.
whole_train (bool, optional) – If True, the whole dataset is used for training. Defaults to False.
- Returns:
Train, validation and test dataloaders.
- Return type:
Tuple[DataLoader, DataLoader, DataLoader]