peal.data.tabular_datasets.GermanDataset¶
- class peal.data.tabular_datasets.GermanDataset[source]¶
Bases:
SymbolicDatasetGerman Credit dataset (OpenML
credit-g).On first use the frame is fetched with
sklearn.datasets.fetch_openml,classis mapped toTarget(good=1, bad=0), a binarysexcolumn is derived frompersonal_statusas the confounder, categorical columns are integer-coded and everything is cast to float before writing<dataset_path>/data.csv.config.input_sizeis set from the header.- Parameters:
mode (
str) – Split to load.config (
DataConfig) – Dataset configuration;dataset_pathis the directory ofdata.csv.**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: