What’s new#
Current 0.8 (dev0)#
Enhancements#
Bugs#
API changes#
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 sheme (#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)
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, Dan 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, Dan 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)