UCIRegressionDataModule#

class torch_uncertainty.datamodules.UCIRegressionDataModule(root, dataset_name, batch_size, eval_batch_size=None, 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.

  • 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.

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

  • eval_batch_size (int | None) – Number of samples per batch during evaluation (val and test). Set to batch_size if None. Defaults to None.

  • 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.