What’s new#
Please follow the examples below like braindecode.EEGClassifier, so the
whats_new page will have a link to the function/class documentation.
“Enhancements” for new features
“Bugs” for bug fixes
“API changes” for backward-incompatible changes
Current 0.9 (dev0)#
Enhancements#
Bugs#
API changes#
Current 0.8 (11-2022)#
Enhancements#
Adding
braindecode.models.EEGInceptionMInetwork for motor imagery (#428 by Cedric Rommel)Adding
braindecode.models.ATCNetnetwork for motor imagery (#429 by Cedric Rommel)Adding to
braindecode.datasets.tuh.TUHcompatibility with version 3.0 of TUH dataset (#431 by Mohammad Javad D, Bruno Aristimunha, Robin Tibor Schirrmeister, Lukas Gemein, Denis A. Engemann and Oskar Størmer)Adding
braindecode.models.DeepSleepNetnetwork for sleep staging (#417 by Theo Gnassounou)Adding
braindecode.models.EEGConformernetwork (#454 by Yonghao Song and Bruno Aristimunha)Adding einops in the requirements (#466 by Bruno Aristimunha)
Have moabb as an extra dependency (#467 by Marco Zamboni)
Replacing the replacing Pytorch layers to Rearrange from einops #468 (#468 by Bruno Aristimunha)
Refactoring the documentation and creating a sub-structure for the examples (#470 by Denis A. Engemann and Bruno Aristimunha)
Solving issues with slow conda and splitting the doc and test .yml to speed the CI. (#479 by Bruno Aristimunha)
Improving the GitHub Actions CI and solving the skorch compatibility in the examples (#472 by Bruno Aristimunha)
Changing the documentation order (#489 by Bruno Aristimunha)
Improve the documentation for the Temple University Hospital (TUH) EEG Corpus with discrete targets (#485 by Pierre Guetschel and Bruno Aristimunha)
Improving documentation for MOABB dataset, Trialwise Decoding & Cropped Decoding (#490 by Daniel Wilson)
Improving the documentation for the sleep stage examples (#487 by Bruno Aristimunha)
Improving the tutorial Hyperparameter tuning with scikit-learn (#473 by Bruno Aristimunha)
Add
braindecode.models.base.EEGModuleMixinbase class for all braindecode models (#488 by Pierre Guetschel)Normalize all models common parameters and leaving the old ones as deprecated (#488 by Pierre Guetschel)
Improving the tutorial with a Data Augmentation Search (#495 by Sylvain Chevallier)
Improving documentation for “Split Dataset” and “Process a big data EEG resource” examples (#494 by Bruna Lopes)
Improving documentation for the Convolutional neural network regression model on fake data (#491 by Sara Sedlar)
Enforcing the eval mode in the function predict trial. (#497 by Bruno Aristimunha)
Adding extra requirements for pip install, update doc, removing conda env file (#505 by Sylvain Chevallier)
Add models user-friendly representation with torchinfo tables to
braindecode.models.base.EEGModuleMixin(#488 by Maciej Śliwowski)Merged temporal and spatial convolutions for Deep4 and ShallowFBCSP (by Daniel Wilson and Sara Sedlar)
Enabling data augmentation of single inputs (with no batch dimension). (#503 by Cedric Rommel)
Adding randomize parameter to
braindecode.samplers.SequenceSampler(#504 by `Théo Gnassounou`_.)Creating new preprocessor objects based on mne’s raw/Epochs methods
braindecode.preprocessing.Resample,braindecode.preprocessing.DropChannels,braindecode.preprocessing.SetEEGReference,braindecode.preprocessing.Filter,braindecode.preprocessing.Pick,braindecode.preprocessing.Crop(#500 by Bruna Lopes and Bruno Aristimunha)Moving :function:`braindecode.models.util.get_output_shape` and :function:`braindecode.models.util.to_dense_prediction_model` to
braindecode.models.base.EEGModuleMixin(#514 by Maciej Śliwowski)Automatically populate signal-related parameters in
braindecode.EEGClassifierandbraindecode.EEGRegressor(#517 by Pierre Guetschel)Adding a pure PyTorch tutorial (#523 by Remi Delbouys and Bruno Aristimunha)
Add
models_dicttobraindecode.models.util(#524 by Pierre Guetschel)Keep using mne.Raw after windowing to speed up windowing, do not create mne.Epochs (#515 by Robin Tibor Schirrmeister)
Changing
braindecode.models.Deep4Netfinal_conv_length default value to ‘auto’ (#535 by Maciej Śliwowski)Add support for
mne.Epochsinbraindecode.EEGClassifierandbraindecode.EEGRegressor(#529 by Pierre Guetschel)Allow passing only the name of a braindecode model to
braindecode.EEGClassifierandbraindecode.EEGRegressor(#528 by Pierre Guetschel)Standardizing models’ last layer names (#520 by Bruna Lopes and Pierre Guetschel)
Add basic training example with MNE epochs (#539 by Pierre Guetschel)
Log validation accuracy in
braindecode.EEGClassifier(#541 by Pierre Guetschel)Better type hints in
braindecode.augmentation.base(#551 by Valentin Iovene)Support for MOABB 1.0.0 and switch to pyproject.toml (#553 by Sylvain Chevallier)
Adding pre-commit hooks (#556 by Bruno Aristimunha)
Bugs#
Fixing conda env in the CI (#461 by Bruno Aristimunha)
Fixing E231 missing whitespace after ‘,’ untraceable error in old flake8 (#460 by Bruno Aristimunha)
Removing deprecation warning due to torch transposition in
braindecode.augmentation.functional._frequency_shift()(#446 by Matthieu Terris)Fix padding’s device in
braindecode.models.EEGResNet(#451 by Pierre Guetschel)Fix skorch version issue (#465 by Marco Zamboni)
Fix wrong kernel_size dtype when running torchinfo in
braindecode.models.USleep(#538 by Maciej Śliwowski)Fix bug when using GPU and channel shuffle transform (#546 by Robin Tibor Schirrmeister)
API changes#
Renaming the
braindecode.models.EEGInceptionnetwork asbraindecode.models.EEGInceptionERP(#428 by Cedric Rommel)Removing support for Python 3.7 (#397 by Bruno Aristimunha)
Removing the LogSoftmax layer from the models and adding deprecated warnings and temporary flags (#513 by Sara Sedlar)
Current 0.7 (10-2022)#
Enhancements#
Adding EEG-Inception Network
braindecode.models.EEGInception(#390 by Bruno Aristimunha and Cedric Rommel)Adding EEG-ITNet Network
braindecode.models.EEGITNet(#400 by Ghaith Bouallegue)Allowing target_names as list for BaseDataset (#371 by Mohammad Javad D and Robin Tibor Schirrmeister)
Adding tutorial with GridSearchCV for data augmentation on the BCIC IV 2a with module braindecode.augmentation (#389 by Bruno Aristimunha and Cedric Rommel)
Adding tutorial with GridSearchCV to exemplify how to tune hyperparameters, for instance with the learning rate (#349 by Lukas Gemein and by Bruno Aristimunha)
Adding tutorial with a Unified Validation scheme (#378 by Bruno Aristimunha and Martin Wimpff)
Adding verbose parameter to
braindecode.preprocessing.create_windows_from_events(),braindecode.preprocessing.create_windows_from_target_channels(), andbraindecode.preprocessing.create_fixed_length_windows()(#391 by Lukas Gemein)Enable augmentation on GPU within
AugmentedDataloadervia a new device parameter (#406 by Martin Wimpff, Bruno Aristimunha and Cedric Rommel)Adding randomize parameter to
braindecode.samplers.SequenceSampler(#504 by `Théo Gnassounou`_.)
Bugs#
Fixing parameter subject_ids to recoding_ids in TUHAbnormal example (#402 by Bruno Aristimunha and Lukas Gemein)
Bug fix
braindecode.augmentation.functional.ft_surrogate()and add option to sample independently per-channel (#409 by Martin Wimpff and Cedric Rommel)
API changes#
Renaming the method get_params to get_augmentation_params in augmentation classes. This makes the Transform module compatible with scikit-learn cloning mechanism (#388 by Bruno Aristimunha and Alex Gramfort)
Delaying the deprecation of the preprocessing scale function
braindecode.preprocessing.scale()and updates tutorials where the function were used. (#413 by Bruno Aristimunha)Removing deprecated functions and classes
braindecode.preprocessing.zscore(),braindecode.datautil.MNEPreprocandbraindecode.datautil.NumpyPreproc(#415 by Bruno Aristimunha)Setting iterator_train__drop_last=True by default for
braindecode.EEGClassifierandbraindecode.EEGRegressor(#411 by Robin Tibor Schirrmeister)
Version 0.6 (2021-12-06)#
Enhancements#
Adding
braindecode.samplers.SequenceSampleralong with support for returning sequences of windows inbraindecode.datasets.BaseConcatDatasetand an updated sleep staging example to show how to train on sequences of windows (#263 by Hubert Banville)Adding Thinker Invariance Network
braindecode.models.TIDNet(#170 by Ann-Kathrin Kiessner, Daniel Wilson, Henrik Bonsmann, Vytautas Jankauskas)Adding a confusion matrix plot generator
braindecode.visualization.plot_confusion_matrix()(#274 by Ann-Kathrin Kiessner, `Dan Wilson`_, Henrik Bonsmann, Vytautas Jankauskas)Adding data Augmentation module (#254 by Cedric Rommel, Alex Gramfort and Thomas Moreau)
Adding Mixup augmentation
braindecode.augmentation.Mixup(#254 by Simon Brandt)Adding saving of preprocessing and windowing choices in
braindecode.preprocessing.preprocess(),braindecode.preprocessing.create_windows_from_events()andbraindecode.preprocessing.create_fixed_length_windows()to datasets to facilitate reproducibility (#287 by Lukas Gemein)Adding
braindecode.models.util.aggregate_probas()to perform self-ensembling of predictions with sequence-to-sequence models (#294 by Hubert Banville)Adding
braindecode.training.scoring.predict_trials()to generate trialwise predictions after cropped training (#312 by Lukas Gemein)Preprocessing and windowing choices are now saved on the level of individual datasets (#288 by Lukas Gemein)
Serialization now happens entirely on dataset level creating subsets for individual datasets that contain ‘fif’ and ‘json’ files (#288 Lukas Gemein)
Instantiation of TUH
braindecode.datasets.tuh.TUHand TUHAbnormalbraindecode.datasets.tuh.TUHAbnormal, as well as loadingbraindecode.datautil.serialization.load_concat_dataset()of stored datasets now support multiple workers (#288 by Lukas Gemein)Adding balanced sampling of sequences of windows with
braindecode.samplers.BalancedSequenceSampleras proposed in U-Sleep paper (#295 by Theo Gnassounou and Hubert Banville)braindecode.preprocessing.preprocess()can now work in parallel and serialize datasets to enable lazy-loading (i.e. preload=False) (#277 by Hubert Banville)Adding
braindecode.models.TimeDistributedto apply a module on a sequence (#318 by Hubert Banville)Adding time series targets decoding together with
braindecode.datasets.BCICompetitionIVDataset4and fingers flexion decoding from ECoG examples (#261 by Maciej Śliwowski and Mohammed Fattouh)Make EEGClassifier and EEGRegressor cloneable for scikit-learn (#347 by Lukas Gemein, Robin Tibor Schirrmeister, Maciej Śliwowski and Alex Gramfort)
Allow to raise a warning when a few trials are shorter than the windows length, instead of raising an error and stopping all computation. (#353 by Cedric Rommel)
Setting torch.backends.cudnn.benchmark in
braindecode.util.set_random_seeds(), adding warning and more info to the docstring to improve reproducibility (#333 by Maciej Śliwowski)Adding option to pass arguments through
braindecode.datasets.MOABBDataset(#365 by Pierre Guetschel)Adding a possibility to use a dict to split a BaseConcatDataset in
braindecode.datasets.BaseConcatDataset.split()(#367 by Alex Gramfort)Adding
cropparameter tobraindecode.datasets.SleepPhysionetdataset to speed up examples (#367 by Alex Gramfort)
Bugs#
Correctly computing recording length in
braindecode.preprocessing.windowers.create_fixed_length_windows()in case recording was cropped (#304 by Lukas Gemein)Fixing
braindecode.datasets.SleepPhysionetto allow serialization and avoid mismatch in channel names attributes (#327 by Hubert Banville)Propagating target_transform to all datasets when using
braindecode.datasets.BaseConcatDataset.subset()(#261 by Maciej Śliwowski)
API changes#
Removing the default sampling frequency sfreq value in
braindecode.datasets.create_windows_from_events()(#256 by Ann-Kathrin Kiessner, Daniel Wilson, Henrik Bonsmann, Vytautas Jankauskas)Made windowing arguments optional in
braindecode.preprocessing.windowers.create_fixed_length_windows()&braindecode.preprocessing.windowers.create_windows_from_events()(#269 by Ann-Kathrin Kiessner, `Dan Wilson`_, Henrik Bonsmann, Vytautas Jankauskas)Deprecating preprocessing functions
braindecode.preprocessing.zscore()andbraindecode.preprocessing.scale()in favour of sklearn’s implementation (#292 by Hubert Banville)braindecode.preprocessing.preprocess()now returns abraindecode.dataset.BaseConcatDatasetobject (#277 by Hubert Banville)
Version 0.5.1 (2021-07-14)#
Enhancements#
Adding n_jobs parameter to windowers
braindecode.datautil.create_windows_from_events()andbraindecode.datautil.create_fixed_length_windows()to allow for parallelization of the windowing process (#199 by Hubert Banville)Adding support for on-the-fly transforms (#198 by Hubert Banville)
Unifying preprocessors under the
braindecode.datautil.Preprocessorclass (#197 by Hubert Banville)Adding self-supervised learning example on the Sleep Physionet dataset along with new sampler module braindecode.samplers (#178 by Hubert Banville)
Adding sleep staging example on the Sleep Physionet dataset (#161 by Hubert Banville)
Adding new parameters to windowers
braindecode.datautil.create_windows_from_events()andbraindecode.datautil.create_fixed_length_windows()for finer control over epoching (#152 by Hubert Banville)Adding Temporal Convolutional Network
braindecode.models.TCN(#138 by Lukas Gemein)Adding option to use BaseConcatDataset as input to BaseConcatDataset (#142 by Lukas Gemein)
Adding a simplified API for splitting of BaseConcatDataset: parameters property and split_ids in
braindecode.datasets.BaseConcatDataset.split()are replaced by by (#147 by Lukas Gemein)Adding a preprocessor that realizes a filterbank:
braindecode.datautil.filterbank()(#158 by Lukas Gemein)Removing code duplicate in BaseDataset and WindowsDataset (#159 by Lukas Gemein)
Only load data if needed during preprocessing (e.g., allow timecrop without loading) (#164 by Robin Tibor Schirrmeister)
Adding option to sort filtered channels by frequency band for the filterbank in
braindecode.datautil.filterbank()(#185 by Lukas Gemein)Adding the USleep model
braindecode.models.USleep(#282 by Theo Gnassounou and Omar Chehab)Adding
braindecode.models.SleepStagerEldele2021andbraindecode.models.SleepStagerBlanco2020models for sleep staging (#341 by Divyesh Narayanan)
Bugs#
Amplitude gradients are correctly computed for layers with multiple filters (before, they were accidentally summed over all previous filters in the layer) (#167 by Robin Tibor Schirrmeister)
braindecode.models.get_output_shape()andbraindecode.visualization.compute_amplitude_gradients()assume 3d, not 4d inputs (#166 by Robin Tibor Schirrmeister)Fixing windower functions when the continuous data has been cropped (#152 by Hubert Banville)
Fixing incorrect usage of recording ids in TUHAbnormal (#146 by Lukas Gemein)
Adding check for correct input dimensions (4d) in TCN (#169 by Lukas Gemein)
Fixing
braindecode.datautil.create_windows_from_events()when window_size is not given but there is atrial_stop_offset_samples(#148 by Lukas Gemein)Fixing
braindecode.classifier.EEGClassifier.predict_proba()andbraindecode.regressor.EEGRegressor.predict()behavior in the cropped mode (#171 by Maciej Śliwowski)Freeze torch random generator for scoring functions for reproducibility (#155 by Robin Tibor Schirrmeister)
Make EEGResNet work for
final_pool_length='auto'(#223 by Robin Tibor Schirrmeister and Maciej Śliwowski)
API changes#
Preprocessor classes
braindecode.datautil.MNEPreprocandbraindecode.datautil.NumpyPreprocare deprecated in favor ofbraindecode.datautil.Preprocessor(#197 by Hubert Banville)Parameter stop_offset_samples of
braindecode.datautil.create_fixed_length_windows()must now be set to None instead of 0 to indicate the end of the recording (#152 by Hubert Banville)