peal.data.tabular_datasets.CircleDataset

class peal.data.tabular_datasets.CircleDataset[source]

Bases: SymbolicDataset

Synthetic 2-D “circle” dataset with a planted confounder.

If config.dataset_path does not exist the data is generated first with CircleDatasetGenerator; otherwise this is a plain SymbolicDataset.

Parameters:
  • mode (str) – Split to load ("train", "val" or "test").

  • config (DataConfig) – Dataset configuration; dataset_path is where the csv lives or is generated.

  • **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]

Generate the csv if needed and build the SymbolicDataset.

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]}; "relative" is divided by reference_outlier_scores when that is set.

Return type:

dict