peal.data.tabular_datasets.AdultDataset

class peal.data.tabular_datasets.AdultDataset[source]

Bases: SymbolicDataset

UCI Adult income dataset (wenruliu/adult-income-dataset on Kaggle).

On first use the csv is downloaded with the Kaggle API and passed through curate_adult_frame(), which produces the one-hot encoding the committed configs select; the raw table is kept as data_original.csv and the result written to <dataset_path>/data.csv. An existing data.csv in the older category-coded encoding is curated in place on first use, because no config can consume that encoding. config.input_size is then set from the header.

Parameters:
  • mode (str) – Split to load.

  • config (DataConfig) – Dataset configuration; dataset_path is the directory of data.csv and input_size is overwritten.

  • **kwargs – Forwarded to SymbolicDataset.

Methods

calculate_outlier_score

Outlier scores of a batch; tabular data has none, so all zeros.

Attributes

__init__(mode, config, **kwargs)[source]

Download/convert data.csv if missing, then build the dataset.

calculate_outlier_score(x)[source]

Outlier scores of a batch; tabular data has none, so all zeros.

Parameters:

x (torch.Tensor) – Batch of samples [B, ...].

Returns:

{"absolute": zeros[B], "relative": zeros[B]}.

Return type:

dict