TabularRegressionDataset#

class torch_uncertainty.datasets.regression.TabularRegressionDataset(root, transform=None, target_transform=None, download=False, train=True, test_split=0.2, split_seed=42)[source]#

UCI regression dataset.

Parameters:
  • root (Path | str) – Root directory of the datasets.

  • transform (Callable | None) – Transform applied to each input sample. Defaults to None.

  • target_transform (Callable | None) – Transform applied to each target. Defaults to None.

  • download (bool) – If True, downloads the dataset. Defaults to False.

  • train (bool) – If True, returns the training split. Defaults to True.

  • test_split (float) – Fraction of the dataset held out as test set. Defaults to 0.2.

  • split_seed (int) – Random seed for the train/test split. Defaults to 42.

Note

The licenses of the datasets may differ from TorchUncertainty’s license. Check before use.

download()[source]#

Download and, if needed, extract the dataset.

Return type:

None