brine.openml module#

brine.openml.get_or_compute_brine(data_id: int, local_data: Path, start_from_dyson: bool = False) tuple[Bunch, BRINE][source]#

Loads an OpenML dataset and its BRINE result from the local cache, fetching the dataset and running BRINE if not already present.

Parameters:
data_id: int

The OpenML dataset id

local_data: Path

The directory used to cache the downloaded dataset and the computed BRINE result

start_from_dyson: bool, optional

Forwarded to BRINE.run (default=False). Only used when the result is not already cached; a cache hit is returned regardless of this value.

Returns:
foml: sklearn.utils.Bunch

The OpenML dataset

brine: BRINE

The computed BRINE result for foml.data

See also

get_or_fetch_openml_dataset
BRINE.run
brine.openml.get_or_compute_dyson(data_id: int, local_data: Path) tuple[Bunch, DysonEqualizer][source]#

Loads an OpenML dataset and its Dyson Equalizer result from the local cache, fetching the dataset and computing the Dyson Equalizer if not already present.

Parameters:
data_id: int

The OpenML dataset id

local_data: Path

The directory used to cache the downloaded dataset and the computed Dyson Equalizer

Returns:
foml: sklearn.utils.Bunch

The OpenML dataset

de: DysonEqualizer

The computed Dyson Equalizer for foml.data

brine.openml.get_or_fetch_openml_dataset(data_id: int, local_data: Path) Bunch[source]#

Loads an OpenML dataset from the local cache, fetching and caching it if not already present.

Parameters:
data_id: int

The OpenML dataset id

local_data: Path

The directory used to cache the downloaded dataset

Returns:
foml: sklearn.utils.Bunch

The OpenML dataset, as returned by sklearn.datasets.fetch_openml

Raises:
NotADirectoryError

If local_data is not an existing directory

ValueError

If data_id is not a positive integer

See also

sklearn.datasets.fetch_openml