braindecode.preprocessing.preprocess(concat_ds, preprocessors, save_dir=None, overwrite=False, n_jobs=None)

Apply preprocessors to a concat dataset.

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_dirstr | 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.


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_jobsint | None

Number of jobs for parallel execution.


Preprocessed dataset.

Examples using braindecode.preprocessing.preprocess