braindecode.preprocessing.preprocess#
- braindecode.preprocessing.preprocess(concat_ds, preprocessors, save_dir=None, overwrite=False, n_jobs=None)[source]#
Apply preprocessors to a concat dataset.
- Parameters
concat_ds (BaseConcatDataset) – A concat of BaseDataset or WindowsDataset datasets to be preprocessed.
preprocessors (list(Preprocessor)) – List of Preprocessor objects to apply to the dataset.
save_dir (str | None) – If a string, the preprocessed data will be saved under the specified directory and the datasets in
concat_ds
will be reloaded with preload=False.overwrite (bool) – When save_dir is provided, controls whether to delete the old subdirectories that will be written to under save_dir. If False and the corresponding subdirectories already exist, a
FileExistsError
will be raised.n_jobs (int | None) – Number of jobs for parallel execution.
- Returns
Preprocessed dataset.
- Return type
Examples using braindecode.preprocessing.preprocess
#
![Benchmarking preprocessing with parallelization and serialization](../_images/sphx_glr_plot_benchmark_preprocessing_thumb.png)
Benchmarking preprocessing with parallelization and serialization
![Sleep staging on the Sleep Physionet dataset using U-Sleep network](../_images/sphx_glr_plot_sleep_staging_usleep_thumb.png)
Sleep staging on the Sleep Physionet dataset using U-Sleep network
![Sleep staging on the Sleep Physionet dataset using Eldele2021](../_images/sphx_glr_plot_sleep_staging_eldele2021_thumb.png)
Sleep staging on the Sleep Physionet dataset using Eldele2021
![Sleep staging on the Sleep Physionet dataset using Chambon2018 network](../_images/sphx_glr_plot_sleep_staging_chambon2018_thumb.png)
Sleep staging on the Sleep Physionet dataset using Chambon2018 network
![Searching the best data augmentation on BCIC IV 2a Dataset](../_images/sphx_glr_plot_data_augmentation_search_thumb.png)
Searching the best data augmentation on BCIC IV 2a Dataset
![Fingers flexion decoding on BCIC IV 4 ECoG Dataset](../_images/sphx_glr_plot_bcic_iv_4_ecog_trial_thumb.png)
Fingers flexion decoding on BCIC IV 4 ECoG Dataset
![Fingers flexion cropped decoding on BCIC IV 4 ECoG Dataset](../_images/sphx_glr_plot_bcic_iv_4_ecog_cropped_thumb.png)
Fingers flexion cropped decoding on BCIC IV 4 ECoG Dataset
![Self-supervised learning on EEG with relative positioning](../_images/sphx_glr_plot_relative_positioning_thumb.png)
Self-supervised learning on EEG with relative positioning