peal.data.tabular_datasets

Tabular datasets for the symbolic (non-image) CFKD/DiDAE experiments.

Each class wraps SymbolicDataset around one data.csv with a Target column and numeric-coded features. When the csv is missing the constructor tries to build it: the synthetic Circle data is generated locally, Adult is downloaded via the Kaggle API, COMPAS from the FairML GitHub mirror and German Credit from OpenML. The constructors also set config.input_size from the csv header so the tabular MLP predictors and the tabular DDPM know their width.

Module attributes

ADULT_FEATURES

The published tabular Adult cell was produced by a one-off curation script (tools/curate_data_adult.py) whose one-hot column names are what configs/tabular_experiments/adaptors/adult_cfkd_dice.yaml selects, e.g. occupation_Professional and gender_Male.

ADULT_RENAME

the raw UCI table spells two of those differently from the Kaggle mirror

ADULT_CATEGORIES

it is the output of the OLD AdultDataset path, which category-coded every string column, so the category names the curation needs are gone.

Functions

curate_adult_frame

Turn a raw Adult table into the one-hot encoding the configs select.

decode_adult_codes

Map an integer-coded Adult table back to its category strings.

setup_kaggle_api

Helper to ensure Kaggle API is authenticated, prompting the user if necessary.

Classes

AdultDataset

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

CircleDataset

Synthetic 2-D "circle" dataset with a planted confounder.

CompassDataset

ProPublica COMPAS recidivism dataset (FairML preprocessed csv).

GermanDataset

German Credit dataset (OpenML credit-g).