eegdash.features.serialization#

Convenience functions for storing and loading features datasets.

See also

https

//github.com/braindecode/braindecode/blob/master/braindecode/datautil/serialization.py#L165-L229

Functions

load_features_concat_dataset(path[, ...])

Load a stored FeaturesConcatDataset from a directory.

eegdash.features.serialization.load_features_concat_dataset(path: str | Path, ids_to_load: list[int] | None = None, n_jobs: int = 1) FeaturesConcatDataset[source]#

Load a stored FeaturesConcatDataset from a directory.

This function reconstructs a FeaturesConcatDataset by loading individual FeaturesDataset instances from subdirectories within the given path. It uses joblib for parallel loading.

Parameters:
  • path (str or pathlib.Path) – The path to the directory where the dataset was saved. This directory should contain subdirectories (e.g., “0”, “1”, “2”, …) for each individual dataset.

  • ids_to_load (list of int, optional) – A list of specific dataset IDs (subdirectory names) to load. If None, all subdirectories in the path will be loaded.

  • n_jobs (int, default 1) – The number of jobs to use for parallel loading. -1 means using all processors.

Returns:

A concatenated dataset containing the loaded FeaturesDataset instances.

Return type:

eegdash.features.datasets.FeaturesConcatDataset