WineQuality#

class torch_uncertainty.datasets.classification.tabular.WineQuality(root, transform=None, target_transform=None, binary=True, download=False, train=True, test_split=0.2, split_seed=21893027, download_only=False, variant='red', threshold=6)[source]#

Wine Quality classification dataset.

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

  • transform (callable, optional) – Transform applied to each sample. Defaults to None.

  • target_transform (callable, optional) – Transform applied to each target. Defaults to None.

  • binary (bool, optional) – If True, binarises quality scores using threshold (score ≥ threshold → 1). If False, keeps raw integer quality scores. Defaults to True.

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

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

  • test_split (float, optional) – Fraction of data held out as test set. Defaults to 0.2.

  • split_seed (int, optional) – Seed for the train/test split. Defaults to 21893027.

  • download_only (bool, optional) – If True, only download the files and skip feature processing. Defaults to False.

  • variant (str, optional) – "red" or "white". Defaults to "red".

  • threshold (int, optional) – Quality threshold for binary mode. Samples with quality ≥ threshold are labelled 1. Defaults to 6.