peal.data.tabular_datasets.AdultDataset¶
- class peal.data.tabular_datasets.AdultDataset[source]¶
Bases:
SymbolicDatasetUCI Adult income dataset (
wenruliu/adult-income-dataseton 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 asdata_original.csvand the result written to<dataset_path>/data.csv. An existingdata.csvin the older category-coded encoding is curated in place on first use, because no config can consume that encoding.config.input_sizeis then set from the header.- Parameters:
mode (
str) – Split to load.config (
DataConfig) – Dataset configuration;dataset_pathis the directory ofdata.csvandinput_sizeis overwritten.**kwargs – Forwarded to
SymbolicDataset.
Methods
Outlier scores of a batch; tabular data has none, so all zeros.
Attributes
- __init__(mode, config, **kwargs)[source]¶
Download/convert
data.csvif 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: