UCIRegression#

class torch_uncertainty.datasets.regression.UCIRegression(root, transform=None, target_transform=None, dataset_name='energy', download=False, seed=42, shuffle=True)[source]#

The UCI regression datasets.

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

  • transform (callable, optional) – A function/transform that takes in a numpy array and returns a transformed version. Defaults to None.

  • target_transform (callable, optional) – A function/transform that takes in the target and transforms it. Defaults to None.

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

  • download (bool, optional) – If True, downloads the dataset from the internet and puts it in root directory. If dataset is already downloaded, it is not downloaded again. Defaults to False.

  • seed (int, optional) – The random seed for shuffling the dataset. Defaults to 42.

  • shuffle (bool, optional) – If True, shuffles the dataset. Defaults to True.

Note

You may want to avoid using the boston-housing dataset because of ethical concerns. The licenses of the datasets may differ from TorchUncertainty’s license. Check before use.

download()[source]#

Download and extract dataset.