Shortcuts

UCIRegressionDataModule

class torch_uncertainty.datamodules.UCIRegressionDataModule(root, batch_size, dataset_name, val_split=0.0, num_workers=1, pin_memory=True, persistent_workers=True, input_shape=None, split_seed=42)[source]

The UCI regression datasets.

Parameters:
  • root (string) – Root directory of the datasets.

  • batch_size (int) – The batch size for training and testing.

  • dataset_name (string, optional) – The name of the dataset. One of “boston-housing”, “concrete”, “energy”, “kin8nm”, “naval-propulsion-plant”, “power-plant”, “protein”, “wine-quality-red”, and “yacht”.

  • val_split (float, optional) – Share of validation samples. Defaults to 0.

  • num_workers (int, optional) – How many subprocesses to use for data loading. Defaults to 1.

  • pin_memory (bool, optional) – Whether to pin memory in the GPU. Defaults to True.

  • persistent_workers (bool, optional) – Whether to use persistent workers. Defaults to True.

  • input_shape (tuple, optional) – The shape of the input data. Defaults to None.

  • split_seed (int, optional) – The seed to use for splitting the dataset. Defaults to 42.

prepare_data()[source]

Download the dataset.

setup(stage=None)[source]

Split the datasets into train, val, and test.