braindecode 0.8__tar.gz → 0.8.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of braindecode might be problematic. Click here for more details.
- {braindecode-0.8/braindecode.egg-info → braindecode-0.8.1}/PKG-INFO +1 -1
- braindecode-0.8.1/braindecode/augmentation/__init__.py +30 -0
- braindecode-0.8.1/braindecode/augmentation/base.py +225 -0
- braindecode-0.8.1/braindecode/augmentation/functional.py +959 -0
- braindecode-0.8.1/braindecode/augmentation/transforms.py +1106 -0
- braindecode-0.8.1/braindecode/datasets/__init__.py +16 -0
- braindecode-0.8.1/braindecode/datasets/base.py +754 -0
- braindecode-0.8.1/braindecode/datasets/bbci.py +703 -0
- braindecode-0.8.1/braindecode/datasets/bcicomp.py +179 -0
- braindecode-0.8.1/braindecode/datasets/mne.py +151 -0
- braindecode-0.8.1/braindecode/datasets/moabb.py +149 -0
- braindecode-0.8.1/braindecode/datasets/sleep_physionet.py +108 -0
- braindecode-0.8.1/braindecode/datasets/tuh.py +404 -0
- braindecode-0.8.1/braindecode/datasets/xy.py +80 -0
- braindecode-0.8.1/braindecode/datautil/__init__.py +33 -0
- braindecode-0.8.1/braindecode/datautil/mne.py +9 -0
- braindecode-0.8.1/braindecode/datautil/preprocess.py +12 -0
- braindecode-0.8.1/braindecode/datautil/serialization.py +315 -0
- braindecode-0.8.1/braindecode/datautil/util.py +41 -0
- braindecode-0.8.1/braindecode/datautil/windowers.py +6 -0
- braindecode-0.8.1/braindecode/datautil/xy.py +9 -0
- braindecode-0.8.1/braindecode/models/__init__.py +30 -0
- braindecode-0.8.1/braindecode/models/atcnet.py +658 -0
- braindecode-0.8.1/braindecode/models/base.py +312 -0
- braindecode-0.8.1/braindecode/models/deep4.py +333 -0
- braindecode-0.8.1/braindecode/models/deepsleepnet.py +265 -0
- braindecode-0.8.1/braindecode/models/eegconformer.py +432 -0
- braindecode-0.8.1/braindecode/models/eeginception.py +317 -0
- braindecode-0.8.1/braindecode/models/eeginception_erp.py +313 -0
- braindecode-0.8.1/braindecode/models/eeginception_mi.py +313 -0
- braindecode-0.8.1/braindecode/models/eegitnet.py +237 -0
- braindecode-0.8.1/braindecode/models/eegnet.py +405 -0
- braindecode-0.8.1/braindecode/models/eegresnet.py +280 -0
- braindecode-0.8.1/braindecode/models/functions.py +47 -0
- braindecode-0.8.1/braindecode/models/hybrid.py +145 -0
- braindecode-0.8.1/braindecode/models/modules.py +358 -0
- braindecode-0.8.1/braindecode/models/shallow_fbcsp.py +214 -0
- braindecode-0.8.1/braindecode/models/sleep_stager_blanco_2020.py +158 -0
- braindecode-0.8.1/braindecode/models/sleep_stager_chambon_2018.py +156 -0
- braindecode-0.8.1/braindecode/models/sleep_stager_eldele_2021.py +429 -0
- braindecode-0.8.1/braindecode/models/tcn.py +203 -0
- braindecode-0.8.1/braindecode/models/tidnet.py +282 -0
- braindecode-0.8.1/braindecode/models/usleep.py +327 -0
- braindecode-0.8.1/braindecode/models/util.py +165 -0
- braindecode-0.8.1/braindecode/preprocessing/__init__.py +12 -0
- braindecode-0.8.1/braindecode/preprocessing/mne_preprocess.py +71 -0
- braindecode-0.8.1/braindecode/preprocessing/preprocess.py +414 -0
- braindecode-0.8.1/braindecode/preprocessing/windowers.py +642 -0
- braindecode-0.8.1/braindecode/samplers/__init__.py +10 -0
- braindecode-0.8.1/braindecode/samplers/base.py +285 -0
- braindecode-0.8.1/braindecode/samplers/ssl.py +118 -0
- braindecode-0.8.1/braindecode/training/__init__.py +15 -0
- braindecode-0.8.1/braindecode/training/callbacks.py +25 -0
- braindecode-0.8.1/braindecode/training/losses.py +110 -0
- braindecode-0.8.1/braindecode/training/scoring.py +475 -0
- braindecode-0.8.1/braindecode/visualization/__init__.py +9 -0
- braindecode-0.8.1/braindecode/visualization/confusion_matrices.py +245 -0
- braindecode-0.8.1/braindecode/visualization/gradients.py +53 -0
- {braindecode-0.8 → braindecode-0.8.1/braindecode.egg-info}/PKG-INFO +1 -1
- {braindecode-0.8 → braindecode-0.8.1}/braindecode.egg-info/SOURCES.txt +57 -0
- {braindecode-0.8 → braindecode-0.8.1}/pyproject.toml +2 -2
- {braindecode-0.8 → braindecode-0.8.1}/LICENSE.txt +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/MANIFEST.in +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/README.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/braindecode/__init__.py +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/braindecode/classifier.py +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/braindecode/eegneuralnet.py +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/braindecode/regressor.py +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/braindecode/util.py +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/braindecode/version.py +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/braindecode.egg-info/dependency_links.txt +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/braindecode.egg-info/requires.txt +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/braindecode.egg-info/top_level.txt +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/Makefile +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/_build/html/_downloads/090305d06248840b75133975e5121f41/plot_sleep_staging_chambon2018.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/_build/html/_downloads/0f2bf063e08b7d05b80e0004fcbbb6f9/benchmark_lazy_eager_loading.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/_build/html/_downloads/10fc813a8f78253f4bf301264950f5c1/plot_bcic_iv_4_ecog_cropped.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/_build/html/_downloads/1c6590d134fa0befda654e89aa55b2ac/plot_benchmark_preprocessing.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/_build/html/_downloads/1d879df548fa18be8c23d9ca0dc008d4/plot_data_augmentation.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/_build/html/_downloads/2466f8ec5c733d0bd65e187b45d875cc/plot_data_augmentation_search.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/_build/html/_downloads/263464a28477cf8decb861ae6e2e9be7/plot_how_train_test_and_tune.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/_build/html/_downloads/3862cafd7f0d815e434319ffe525afc8/plot_bcic_iv_2a_moabb_cropped.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/_build/html/_downloads/408ca4ffd0ea1f76faa9ef602734ac94/plot_tuh_eeg_corpus.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/_build/html/_downloads/75a73c7d94f3a671fd3dec28f4031ead/plot_regression.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/_build/html/_downloads/84fbcd59a346e5e56758285122dc69e2/plot_sleep_staging_eldele2021.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/_build/html/_downloads/8616a7f968141825e56ab3e3d59be449/plot_tuh_discrete_multitarget.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/_build/html/_downloads/8b5ba06718764b959e8dea1dd0bb97df/plot_sleep_staging_usleep.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/_build/html/_downloads/91651c9d4fde110b4a53f5775a91acc5/plot_mne_dataset_example.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/_build/html/_downloads/9a4447462c3b255ba7e5ca212bbadd52/plot_bcic_iv_2a_moabb_trial.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/_build/html/_downloads/a39e4245738e55e0eb7084c545ed05bc/plot_hyperparameter_tuning_with_scikit-learn.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/_build/html/_downloads/a6249715d3c30cb41c4af85938cca008/plot_moabb_dataset_example.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/_build/html/_downloads/a7ccc5c1d1d2775e08c053bb25c81a91/plot_bcic_iv_4_ecog_trial.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/_build/html/_downloads/a86d0c5f3a882a069df1683a708d3e25/plot_train_in_pure_pytorch_and_pytorch_lightning.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/_build/html/_downloads/aa8426d97090e7b3062c4e4732c3214a/plot_relative_positioning.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/_build/html/_downloads/b9d19304ecd233ea7a79d4365316ea49/plot_load_save_datasets.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/_build/html/_downloads/f3c89d39e947a121c7920b4d415413a2/plot_split_dataset.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/_build/html/_downloads/f7b38cac92c078838442753121efc297/plot_custom_dataset_example.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/_build/html/_downloads/fff46913db5173d3ae22c1113acffb45/plot_basic_training_epochs.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/_templates/autosummary/class.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/_templates/autosummary/function.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/api.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/advanced_training/index.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/advanced_training/plot_bcic_iv_4_ecog_cropped.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/advanced_training/plot_bcic_iv_4_ecog_cropped.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/advanced_training/plot_data_augmentation.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/advanced_training/plot_data_augmentation.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/advanced_training/plot_data_augmentation_search.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/advanced_training/plot_data_augmentation_search.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/advanced_training/plot_relative_positioning.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/advanced_training/plot_relative_positioning.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/advanced_training/sg_execution_times.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/applied_examples/index.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/applied_examples/plot_bcic_iv_4_ecog_trial.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/applied_examples/plot_bcic_iv_4_ecog_trial.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/applied_examples/plot_sleep_staging_chambon2018.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/applied_examples/plot_sleep_staging_chambon2018.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/applied_examples/plot_sleep_staging_eldele2021.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/applied_examples/plot_sleep_staging_eldele2021.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/applied_examples/plot_sleep_staging_usleep.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/applied_examples/plot_sleep_staging_usleep.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/applied_examples/plot_tuh_eeg_corpus.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/applied_examples/plot_tuh_eeg_corpus.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/applied_examples/sg_execution_times.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/datasets_io/benchmark_lazy_eager_loading.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/datasets_io/benchmark_lazy_eager_loading.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/datasets_io/index.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/datasets_io/plot_benchmark_preprocessing.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/datasets_io/plot_benchmark_preprocessing.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/datasets_io/plot_custom_dataset_example.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/datasets_io/plot_custom_dataset_example.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/datasets_io/plot_load_save_datasets.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/datasets_io/plot_load_save_datasets.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/datasets_io/plot_mne_dataset_example.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/datasets_io/plot_mne_dataset_example.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/datasets_io/plot_moabb_dataset_example.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/datasets_io/plot_moabb_dataset_example.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/datasets_io/plot_split_dataset.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/datasets_io/plot_split_dataset.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/datasets_io/plot_tuh_discrete_multitarget.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/datasets_io/plot_tuh_discrete_multitarget.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/datasets_io/sg_execution_times.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/index.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/model_building/index.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/model_building/plot_basic_training_epochs.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/model_building/plot_basic_training_epochs.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/model_building/plot_bcic_iv_2a_moabb_cropped.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/model_building/plot_bcic_iv_2a_moabb_cropped.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/model_building/plot_bcic_iv_2a_moabb_trial.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/model_building/plot_bcic_iv_2a_moabb_trial.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/model_building/plot_how_train_test_and_tune.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/model_building/plot_how_train_test_and_tune.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/model_building/plot_hyperparameter_tuning_with_scikit-learn.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/model_building/plot_hyperparameter_tuning_with_scikit-learn.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/model_building/plot_regression.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/model_building/plot_regression.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/model_building/plot_train_in_pure_pytorch_and_pytorch_lightning.ipynb +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/model_building/plot_train_in_pure_pytorch_and_pytorch_lightning.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/auto_examples/model_building/sg_execution_times.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/cite.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/conf.py +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.AugmentedDataLoader.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.BandstopFilter.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.ChannelsDropout.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.ChannelsShuffle.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.ChannelsSymmetry.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.Compose.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.FTSurrogate.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.FrequencyShift.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.GaussianNoise.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.IdentityTransform.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.Mixup.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.SensorsRotation.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.SensorsXRotation.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.SensorsYRotation.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.SensorsZRotation.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.SignFlip.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.SmoothTimeMask.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.TimeReverse.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.Transform.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.functional.bandstop_filter.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.functional.channels_dropout.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.functional.channels_permute.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.functional.channels_shuffle.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.functional.frequency_shift.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.functional.ft_surrogate.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.functional.gaussian_noise.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.functional.identity.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.functional.mixup.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.functional.sensors_rotation.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.functional.sign_flip.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.functional.smooth_time_mask.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.augmentation.functional.time_reverse.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.classifier.EEGClassifier.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.datasets.BCICompetitionIVDataset4.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.datasets.BNCI2014001.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.datasets.BaseConcatDataset.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.datasets.BaseDataset.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.datasets.HGD.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.datasets.MOABBDataset.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.datasets.SleepPhysionet.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.datasets.TUH.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.datasets.TUHAbnormal.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.datasets.WindowsDataset.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.datasets.create_from_X_y.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.datasets.create_from_mne_epochs.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.datasets.create_from_mne_raw.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.datautil.load_concat_dataset.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.datautil.save_concat_dataset.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.models.ATCNet.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.models.Deep4Net.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.models.DeepSleepNet.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.models.EEGConformer.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.models.EEGITNet.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.models.EEGInception.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.models.EEGInceptionERP.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.models.EEGInceptionMI.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.models.EEGModuleMixin.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.models.EEGNetv1.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.models.EEGNetv4.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.models.EEGResNet.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.models.HybridNet.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.models.ShallowFBCSPNet.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.models.SleepStagerBlanco2020.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.models.SleepStagerChambon2018.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.models.SleepStagerEldele2021.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.models.TCN.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.models.TIDNet.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.models.TimeDistributed.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.models.USleep.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.models.get_output_shape.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.preprocessing.Crop.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.preprocessing.DropChannels.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.preprocessing.Filter.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.preprocessing.Pick.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.preprocessing.Preprocessor.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.preprocessing.Resample.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.preprocessing.SetEEGReference.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.preprocessing.create_fixed_length_windows.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.preprocessing.create_windows_from_events.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.preprocessing.create_windows_from_target_channels.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.preprocessing.exponential_moving_demean.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.preprocessing.exponential_moving_standardize.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.preprocessing.filterbank.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.preprocessing.preprocess.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.preprocessing.scale.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.regressor.EEGRegressor.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.samplers.BalancedSequenceSampler.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.samplers.RecordingSampler.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.samplers.RelativePositioningSampler.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.samplers.SequenceSampler.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.training.CroppedLoss.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.training.CroppedTimeSeriesEpochScoring.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.training.CroppedTrialEpochScoring.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.training.PostEpochTrainScoring.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.training.TimeSeriesLoss.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.training.mixup_criterion.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.training.predict_trials.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.training.trial_preds_from_window_preds.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.util.set_random_seeds.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.visualization.compute_amplitude_gradients.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/generated/braindecode.visualization.plot_confusion_matrix.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/help.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/index.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/install/install.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/install/install_pip.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/install/install_source.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/docs/whats_new.rst +0 -0
- {braindecode-0.8 → braindecode-0.8.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: braindecode
|
|
3
|
-
Version: 0.8
|
|
3
|
+
Version: 0.8.1
|
|
4
4
|
Summary: Deep learning software to decode EEG, ECG or MEG signals
|
|
5
5
|
Author-email: Robin Tibor Schirrmeister <robintibor@gmail.com>
|
|
6
6
|
Maintainer-email: Alexandre Gramfort <agramfort@meta.com>, Bruno Aristimunha Pinto <b.aristimunha@gmail.com>, Robin Tibor Schirrmeister <robintibor@gmail.com>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Utilities for data augmentation.
|
|
3
|
+
"""
|
|
4
|
+
from .base import Transform, IdentityTransform, Compose, AugmentedDataLoader
|
|
5
|
+
from .transforms import (
|
|
6
|
+
TimeReverse,
|
|
7
|
+
SignFlip,
|
|
8
|
+
FTSurrogate,
|
|
9
|
+
ChannelsShuffle,
|
|
10
|
+
ChannelsDropout,
|
|
11
|
+
GaussianNoise,
|
|
12
|
+
ChannelsSymmetry,
|
|
13
|
+
SmoothTimeMask,
|
|
14
|
+
BandstopFilter,
|
|
15
|
+
FrequencyShift,
|
|
16
|
+
SensorsRotation,
|
|
17
|
+
SensorsZRotation,
|
|
18
|
+
SensorsYRotation,
|
|
19
|
+
SensorsXRotation,
|
|
20
|
+
Mixup,
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
from . import functional
|
|
24
|
+
|
|
25
|
+
__all__ = ["Transform", "IdentityTransform", "Compose", "AugmentedDataLoader",
|
|
26
|
+
"TimeReverse", "SignFlip", "FTSurrogate", "ChannelsShuffle",
|
|
27
|
+
"ChannelsDropout", "GaussianNoise", "ChannelsSymmetry",
|
|
28
|
+
"SmoothTimeMask", "BandstopFilter", "FrequencyShift",
|
|
29
|
+
"SensorsRotation", "SensorsZRotation", "SensorsYRotation",
|
|
30
|
+
"SensorsXRotation", "Mixup", "functional"]
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
# Authors: Cédric Rommel <cedric.rommel@inria.fr>
|
|
2
|
+
# Alexandre Gramfort <alexandre.gramfort@inria.fr>
|
|
3
|
+
# Bruno Aristimunha <b.aristimunha@gmail.com>
|
|
4
|
+
# Martin Wimpff <martin.wimpff@iss.uni-stuttgart.de>
|
|
5
|
+
# Valentin Iovene <val@too.gy>
|
|
6
|
+
# License: BSD (3-clause)
|
|
7
|
+
|
|
8
|
+
from typing import List, Tuple, Any, Optional, Union, Callable
|
|
9
|
+
from numbers import Real
|
|
10
|
+
|
|
11
|
+
from sklearn.utils import check_random_state
|
|
12
|
+
import torch
|
|
13
|
+
from torch import Tensor, nn
|
|
14
|
+
from torch.utils.data import DataLoader
|
|
15
|
+
from torch.utils.data._utils.collate import default_collate
|
|
16
|
+
|
|
17
|
+
from .functional import identity
|
|
18
|
+
|
|
19
|
+
Batch = List[Tuple[torch.Tensor, int, Any]]
|
|
20
|
+
Output = Union[
|
|
21
|
+
# just outputting X
|
|
22
|
+
torch.Tensor,
|
|
23
|
+
# outputting (X, y) where y can be a tensor or tuple of tensors
|
|
24
|
+
Tuple[torch.Tensor, Union[torch.Tensor, Tuple[torch.Tensor, ...]]]
|
|
25
|
+
]
|
|
26
|
+
# (X, y) -> (X', y') where y' can be a tensor or a tuple of tensors
|
|
27
|
+
Operation = Callable[
|
|
28
|
+
[torch.Tensor, torch.Tensor],
|
|
29
|
+
Tuple[
|
|
30
|
+
torch.Tensor,
|
|
31
|
+
Union[torch.Tensor, Tuple[torch.Tensor, ...]]
|
|
32
|
+
]
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class Transform(torch.nn.Module):
|
|
37
|
+
"""Basic transform class used for implementing data augmentation
|
|
38
|
+
operations.
|
|
39
|
+
|
|
40
|
+
Parameters
|
|
41
|
+
----------
|
|
42
|
+
operation : callable
|
|
43
|
+
A function taking arrays X, y (inputs and targets resp.) and
|
|
44
|
+
other required arguments, and returning the transformed X and y.
|
|
45
|
+
probability : float, optional
|
|
46
|
+
Float between 0 and 1 defining the uniform probability of applying the
|
|
47
|
+
operation. Set to 1.0 by default (e.g always apply the operation).
|
|
48
|
+
random_state: int, optional
|
|
49
|
+
Seed to be used to instantiate numpy random number generator instance.
|
|
50
|
+
Used to decide whether or not to transform given the probability
|
|
51
|
+
argument. Defaults to None.
|
|
52
|
+
"""
|
|
53
|
+
operation: Operation
|
|
54
|
+
|
|
55
|
+
def __init__(self, probability=1.0, random_state=None):
|
|
56
|
+
super().__init__()
|
|
57
|
+
if self.forward.__func__ is Transform.forward:
|
|
58
|
+
assert callable(self.operation), "operation should be a " \
|
|
59
|
+
"``callable``. "
|
|
60
|
+
|
|
61
|
+
assert isinstance(probability, Real), (
|
|
62
|
+
f"probability should be a ``real``. Got {type(probability)}.")
|
|
63
|
+
assert probability <= 1. and probability >= 0., \
|
|
64
|
+
"probability should be between 0 and 1."
|
|
65
|
+
self._probability = probability
|
|
66
|
+
self.rng = check_random_state(random_state)
|
|
67
|
+
|
|
68
|
+
def get_augmentation_params(self, *batch):
|
|
69
|
+
return dict()
|
|
70
|
+
|
|
71
|
+
def forward(self, X: Tensor, y: Optional[Tensor] = None) -> Output:
|
|
72
|
+
"""General forward pass for an augmentation transform.
|
|
73
|
+
|
|
74
|
+
Parameters
|
|
75
|
+
----------
|
|
76
|
+
X : torch.Tensor
|
|
77
|
+
EEG input example or batch.
|
|
78
|
+
y : torch.Tensor | None
|
|
79
|
+
EEG labels for the example or batch. Defaults to None.
|
|
80
|
+
|
|
81
|
+
Returns
|
|
82
|
+
-------
|
|
83
|
+
torch.Tensor
|
|
84
|
+
Transformed inputs.
|
|
85
|
+
torch.Tensor, optional
|
|
86
|
+
Transformed labels. Only returned when y is not None.
|
|
87
|
+
"""
|
|
88
|
+
X = torch.as_tensor(X).float()
|
|
89
|
+
|
|
90
|
+
out_X = X.clone()
|
|
91
|
+
# check if input has a batch dimension
|
|
92
|
+
if len(out_X.shape) < 3:
|
|
93
|
+
out_X = out_X[None, ...]
|
|
94
|
+
|
|
95
|
+
if y is not None:
|
|
96
|
+
y = torch.as_tensor(y).to(out_X.device)
|
|
97
|
+
out_y = y.clone()
|
|
98
|
+
if len(out_y.shape) == 0:
|
|
99
|
+
out_y = out_y.reshape(1)
|
|
100
|
+
else:
|
|
101
|
+
out_y = torch.zeros(out_X.shape[0], device=out_X.device)
|
|
102
|
+
|
|
103
|
+
# Samples a mask setting for each example whether they should stay
|
|
104
|
+
# unchanged or not
|
|
105
|
+
mask = self._get_mask(out_X.shape[0], out_X.device)
|
|
106
|
+
num_valid = mask.sum().long()
|
|
107
|
+
|
|
108
|
+
if num_valid > 0:
|
|
109
|
+
# Uses the mask to define the output
|
|
110
|
+
out_X[mask, ...], tr_y = self.operation(
|
|
111
|
+
out_X[mask, ...], out_y[mask],
|
|
112
|
+
**self.get_augmentation_params(out_X[mask, ...], out_y[mask])
|
|
113
|
+
)
|
|
114
|
+
# Apply the operation defining the Transform to the whole batch
|
|
115
|
+
if isinstance(tr_y, tuple):
|
|
116
|
+
out_y = tuple(tmp_y[mask] for tmp_y in tr_y)
|
|
117
|
+
else:
|
|
118
|
+
out_y[mask] = tr_y
|
|
119
|
+
|
|
120
|
+
# potentially remove empty batch dimension again
|
|
121
|
+
out_X = out_X.reshape_as(X)
|
|
122
|
+
if y is not None:
|
|
123
|
+
return out_X, out_y
|
|
124
|
+
else:
|
|
125
|
+
return out_X
|
|
126
|
+
|
|
127
|
+
def _get_mask(self, batch_size, device) -> torch.Tensor:
|
|
128
|
+
"""Samples whether to apply operation or not over the whole batch
|
|
129
|
+
"""
|
|
130
|
+
return torch.as_tensor(
|
|
131
|
+
self.probability > self.rng.uniform(size=batch_size)
|
|
132
|
+
).to(device)
|
|
133
|
+
|
|
134
|
+
@property
|
|
135
|
+
def probability(self):
|
|
136
|
+
return self._probability
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
class IdentityTransform(Transform):
|
|
140
|
+
"""Identity transform.
|
|
141
|
+
|
|
142
|
+
Transform that does not change the input.
|
|
143
|
+
"""
|
|
144
|
+
operation = staticmethod(identity)
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
class Compose(Transform):
|
|
148
|
+
"""Transform composition.
|
|
149
|
+
|
|
150
|
+
Callable class allowing to cast a sequence of Transform objects into a
|
|
151
|
+
single one.
|
|
152
|
+
|
|
153
|
+
Parameters
|
|
154
|
+
----------
|
|
155
|
+
transforms: list
|
|
156
|
+
Sequence of Transforms to be composed.
|
|
157
|
+
"""
|
|
158
|
+
|
|
159
|
+
def __init__(self, transforms):
|
|
160
|
+
self.transforms = transforms
|
|
161
|
+
super().__init__()
|
|
162
|
+
|
|
163
|
+
def forward(self, X, y):
|
|
164
|
+
for transform in self.transforms:
|
|
165
|
+
X, y = transform(X, y)
|
|
166
|
+
return X, y
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
def _make_collateable(transform, device=None):
|
|
170
|
+
""" Wraps a transform to make it collateable.
|
|
171
|
+
with device control. """
|
|
172
|
+
|
|
173
|
+
def _collate_fn(batch):
|
|
174
|
+
collated_batch = default_collate(batch)
|
|
175
|
+
X, y = collated_batch[:2]
|
|
176
|
+
|
|
177
|
+
if device is not None:
|
|
178
|
+
X = X.to(device)
|
|
179
|
+
y = y.to(device)
|
|
180
|
+
|
|
181
|
+
return (*transform(X, y), *collated_batch[2:])
|
|
182
|
+
|
|
183
|
+
return _collate_fn
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
class AugmentedDataLoader(DataLoader):
|
|
187
|
+
"""A base dataloader class customized to applying augmentation Transforms.
|
|
188
|
+
|
|
189
|
+
Parameters
|
|
190
|
+
----------
|
|
191
|
+
dataset : BaseDataset
|
|
192
|
+
The dataset containing the signals.
|
|
193
|
+
transforms : list | Transform, optional
|
|
194
|
+
Transform or sequence of Transform to be applied to each batch.
|
|
195
|
+
device : str | torch.device | None, optional
|
|
196
|
+
Device on which to transform the data. Defaults to None.
|
|
197
|
+
**kwargs : dict, optional
|
|
198
|
+
keyword arguments to pass to standard DataLoader class.
|
|
199
|
+
"""
|
|
200
|
+
|
|
201
|
+
def __init__(self, dataset, transforms=None, device=None, **kwargs):
|
|
202
|
+
if "collate_fn" in kwargs:
|
|
203
|
+
raise ValueError(
|
|
204
|
+
"collate_fn cannot be used in this context because it is used "
|
|
205
|
+
"to pass transform"
|
|
206
|
+
)
|
|
207
|
+
if transforms is None or (
|
|
208
|
+
isinstance(transforms, list) and len(transforms) == 0
|
|
209
|
+
):
|
|
210
|
+
self.collated_tr = _make_collateable(IdentityTransform(), device=device)
|
|
211
|
+
elif isinstance(transforms, (Transform, nn.Module)):
|
|
212
|
+
self.collated_tr = _make_collateable(transforms, device=device)
|
|
213
|
+
elif isinstance(transforms, list):
|
|
214
|
+
self.collated_tr = _make_collateable(Compose(transforms), device=device)
|
|
215
|
+
else:
|
|
216
|
+
raise TypeError(
|
|
217
|
+
"transforms can be either a Transform object "
|
|
218
|
+
"or a list of Transform objects."
|
|
219
|
+
)
|
|
220
|
+
|
|
221
|
+
super().__init__(
|
|
222
|
+
dataset,
|
|
223
|
+
collate_fn=self.collated_tr,
|
|
224
|
+
**kwargs
|
|
225
|
+
)
|