braindecode.preprocessing.Preprocessor#
- class braindecode.preprocessing.Preprocessor(fn, *, apply_on_array=True, **kwargs)[source]#
Preprocessor for an MNE Raw or Epochs object.
Applies the provided preprocessing function to the data of a Raw or Epochs object. If the function is provided as a string, the method with that name will be used (e.g., ‘pick_channels’, ‘filter’, etc.). If it is provided as a callable and apply_on_array is True, the apply_function method of Raw and Epochs object will be used to apply the function on the internal arrays of Raw and Epochs. If apply_on_array is False, the callable must directly modify the Raw or Epochs object (e.g., by calling its method(s) or modifying its attributes).
- Parameters:
fn (
Callable|str) – If str, the Raw/Epochs object must have a method with that name. If callable, directly apply the callable to the object.apply_on_array (
bool) – Ignored iffnis not a callable. If True, theapply_functionof Raw and Epochs will be used to runfnon the underlying arrays directly. If False,fnmust directly modify the Raw or Epochs object.**kwargs (dict) – Keyword arguments forwarded to the MNE function or callable.
Methods
Examples using braindecode.preprocessing.Preprocessor#
Cleaning EEG Data with EEGPrep for Trialwise Decoding
Comprehensive Preprocessing with MNE-based Classes
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
From window labels to events: asynchronous EEG decoding with DANCE
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