braindecode.preprocessing.preprocess#
- braindecode.preprocessing.preprocess(concat_ds, preprocessors, save_dir=None, overwrite=False, n_jobs=None, offset=0, copy_data=None)[source]#
Apply preprocessors to a concat dataset.
- Parameters:
concat_ds (BaseConcatDataset) – A concat of
BaseDatasetorWindowsDatasetto be preprocessed.preprocessors (list of Preprocessor) – Preprocessor objects to apply to each dataset.
save_dir (str | None) – If provided, save preprocessed data under this directory and reload datasets in
concat_dswithpreload=False.overwrite (bool) – When
save_diris provided, controls whether to delete the old subdirectories that will be written to undersave_dir. If False and the corresponding subdirectories already exist, aFileExistsErroris raised.n_jobs (int | None) – Number of jobs for parallel execution. See
joblib.Parallelfor details.offset (int) – Integer added to the dataset id in the concat. Useful when processing and saving very large datasets in chunks to preserve original positions.
copy_data (bool | None) – Whether the data passed to parallel jobs should be copied or passed by reference.
- Returns:
Preprocessed dataset.
- Return type:
Examples using braindecode.preprocessing.preprocess#
Benchmarking preprocessing with parallelization and serialization
Fingers flexion cropped decoding on BCIC IV 4 ECoG Dataset
Searching the best data augmentation on BCIC IV 2a Dataset
Self-supervised learning on EEG with relative positioning
Fingers flexion decoding on BCIC IV 4 ECoG Dataset
Sleep staging on the Sleep Physionet dataset using Chambon2018 network
Sleep staging on the Sleep Physionet dataset using Eldele2021
Sleep staging on the Sleep Physionet dataset using U-Sleep network