Braindecode 1.3.0.dev173767962__tar.gz → 1.3.0.dev174201910__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.
- {braindecode-1.3.0.dev173767962/braindecode.egg-info → braindecode-1.3.0.dev174201910}/PKG-INFO +44 -20
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/README.rst +14 -1
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/augmentation/__init__.py +4 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/augmentation/functional.py +101 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/augmentation/transforms.py +74 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/classifier.py +3 -8
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/datasets/__init__.py +22 -2
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/datasets/base.py +18 -3
- braindecode-1.3.0.dev174201910/braindecode/datasets/bids_format.py +714 -0
- braindecode-1.3.0.dev174201910/braindecode/datasets/chb_mit.py +172 -0
- braindecode-1.3.0.dev174201910/braindecode/datasets/hub.py +1160 -0
- braindecode-1.3.0.dev174201910/braindecode/datasets/hub_validation.py +113 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/datasets/moabb.py +15 -5
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/datasets/nmt.py +38 -43
- braindecode-1.3.0.dev174201910/braindecode/datasets/registry.py +120 -0
- braindecode-1.3.0.dev174201910/braindecode/datasets/siena.py +164 -0
- braindecode-1.3.0.dev174201910/braindecode/datasets/utils.py +67 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/datautil/__init__.py +13 -1
- braindecode-1.3.0.dev174201910/braindecode/datautil/channel_utils.py +114 -0
- braindecode-1.3.0.dev174201910/braindecode/datautil/hub_formats.py +180 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/datautil/serialization.py +1 -2
- braindecode-1.3.0.dev174201910/braindecode/datautil/util.py +155 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/eegneuralnet.py +20 -48
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/__init__.py +14 -1
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/atcnet.py +12 -12
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/attentionbasenet.py +5 -5
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/attn_sleep.py +11 -7
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/base.py +2 -2
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/bendr.py +27 -2
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/biot.py +56 -25
- braindecode-1.3.0.dev174201910/braindecode/models/config.py +233 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/contrawr.py +4 -2
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/ctnet.py +35 -33
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/deep4.py +4 -4
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/deepsleepnet.py +5 -5
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/eegconformer.py +28 -23
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/eeginception_erp.py +1 -1
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/eeginception_mi.py +3 -3
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/eegitnet.py +5 -3
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/eegminer.py +2 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/eegnet.py +1 -1
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/eegnex.py +1 -1
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/eegsimpleconv.py +1 -1
- braindecode-1.3.0.dev174201910/braindecode/models/eegsym.py +917 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/eegtcnet.py +5 -3
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/fbcnet.py +6 -2
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/fblightconvnet.py +3 -1
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/fbmsnet.py +21 -7
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/hybrid.py +1 -1
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/ifnet.py +4 -2
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/labram.py +69 -43
- braindecode-1.3.0.dev174201910/braindecode/models/luna.py +891 -0
- braindecode-1.3.0.dev174201910/braindecode/models/medformer.py +758 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/msvtnet.py +11 -9
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/patchedtransformer.py +48 -48
- braindecode-1.3.0.dev174201910/braindecode/models/reve.py +837 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/sccnet.py +1 -1
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/shallow_fbcsp.py +4 -2
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/signal_jepa.py +32 -3
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/sinc_shallow.py +3 -2
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/sleep_stager_blanco_2020.py +1 -1
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/sleep_stager_chambon_2018.py +1 -1
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/sparcnet.py +4 -4
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/sstdpn.py +2 -2
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/summary.csv +19 -15
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/syncnet.py +3 -1
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/tcn.py +5 -3
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/tidnet.py +1 -1
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/tsinception.py +1 -1
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/models/usleep.py +3 -3
- braindecode-1.3.0.dev174201910/braindecode/models/util.py +368 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/modules/blocks.py +3 -1
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/modules/filter.py +0 -6
- braindecode-1.3.0.dev174201910/braindecode/preprocessing/__init__.py +271 -0
- braindecode-1.3.0.dev174201910/braindecode/preprocessing/eegprep_preprocess.py +1317 -0
- braindecode-1.3.0.dev174201910/braindecode/preprocessing/mne_preprocess.py +240 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/preprocessing/preprocess.py +134 -39
- braindecode-1.3.0.dev174201910/braindecode/preprocessing/util.py +177 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/preprocessing/windowers.py +2 -1
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/regressor.py +3 -7
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/samplers/ssl.py +1 -1
- braindecode-1.3.0.dev174201910/braindecode/version.py +1 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910/braindecode.egg-info}/PKG-INFO +44 -20
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode.egg-info/SOURCES.txt +16 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode.egg-info/requires.txt +26 -14
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/docs/api.rst +195 -12
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/docs/cite.rst +9 -2
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/docs/conf.py +73 -15
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/docs/index.rst +4 -4
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/docs/install/install_pip.rst +7 -1
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/docs/install/install_source.rst +1 -1
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/docs/models/categorization/attention.rst +5 -5
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/docs/models/categorization/lbm.rst +5 -5
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/docs/models/models_categorization.rst +8 -8
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/docs/models/models_table.rst +2 -2
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/docs/whats_new.rst +41 -2
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/pyproject.toml +37 -21
- braindecode-1.3.0.dev173767962/braindecode/datautil/util.py +0 -41
- braindecode-1.3.0.dev173767962/braindecode/models/util.py +0 -132
- braindecode-1.3.0.dev173767962/braindecode/preprocessing/__init__.py +0 -37
- braindecode-1.3.0.dev173767962/braindecode/preprocessing/mne_preprocess.py +0 -77
- braindecode-1.3.0.dev173767962/braindecode/version.py +0 -1
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/LICENSE.txt +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/MANIFEST.in +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/NOTICE.txt +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/__init__.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/augmentation/base.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/datasets/bbci.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/datasets/bcicomp.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/datasets/bids.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/datasets/experimental.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/datasets/mne.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/datasets/sleep_physio_challe_18.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/datasets/sleep_physionet.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/datasets/tuh.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/datasets/xy.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/functional/__init__.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/functional/functions.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/functional/initialization.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/modules/__init__.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/modules/activation.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/modules/attention.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/modules/convolution.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/modules/layers.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/modules/linear.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/modules/parametrization.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/modules/stats.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/modules/util.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/modules/wrapper.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/samplers/__init__.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/samplers/base.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/training/__init__.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/training/callbacks.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/training/losses.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/training/scoring.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/util.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/visualization/__init__.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/visualization/confusion_matrices.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/visualization/gradients.py +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode.egg-info/dependency_links.txt +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode.egg-info/top_level.txt +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/docs/Makefile +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/docs/_templates/autosummary/class.rst +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/docs/_templates/autosummary/function.rst +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/docs/help.rst +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/docs/install/install.rst +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/docs/models/categorization/channel.rst +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/docs/models/categorization/convolution.rst +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/docs/models/categorization/filterbank.rst +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/docs/models/categorization/gnn.rst +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/docs/models/categorization/interpretable.rst +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/docs/models/categorization/recurrent.rst +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/docs/models/categorization/spd.rst +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/docs/models/models.rst +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/docs/models/models_visualization.rst +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/docs/sg_execution_times.rst +0 -0
- {braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/setup.cfg +0 -0
{braindecode-1.3.0.dev173767962/braindecode.egg-info → braindecode-1.3.0.dev174201910}/PKG-INFO
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: braindecode
|
|
3
|
-
Version: 1.3.0.
|
|
3
|
+
Version: 1.3.0.dev174201910
|
|
4
4
|
Summary: Deep learning software to decode EEG, ECG or MEG signals
|
|
5
|
-
Author-email: Robin Tibor Schirrmeister <robintibor@gmail.com>
|
|
5
|
+
Author-email: Robin Tibor Schirrmeister <robintibor@gmail.com>, Bruno Aristimunha Pinto <b.aristimunha@gmail.com>, Alexandre Gramfort <agramfort@meta.com>
|
|
6
6
|
Maintainer-email: Alexandre Gramfort <agramfort@meta.com>, Bruno Aristimunha Pinto <b.aristimunha@gmail.com>, Robin Tibor Schirrmeister <robintibor@gmail.com>
|
|
7
7
|
License: BSD-3-Clause
|
|
8
8
|
Project-URL: homepage, https://braindecode.org
|
|
@@ -14,40 +14,43 @@ Classifier: Intended Audience :: Developers
|
|
|
14
14
|
Classifier: Intended Audience :: Science/Research
|
|
15
15
|
Classifier: Topic :: Software Development :: Build Tools
|
|
16
16
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
-
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Requires-Python: >=3.11
|
|
21
22
|
Description-Content-Type: text/x-rst
|
|
22
23
|
License-File: LICENSE.txt
|
|
23
24
|
License-File: NOTICE.txt
|
|
24
|
-
Requires-Dist:
|
|
25
|
+
Requires-Dist: torch>=2.2
|
|
26
|
+
Requires-Dist: torchaudio>=2.0
|
|
27
|
+
Requires-Dist: mne>=1.11.0
|
|
25
28
|
Requires-Dist: mne_bids>=0.16
|
|
26
|
-
Requires-Dist: numpy
|
|
27
|
-
Requires-Dist: pandas
|
|
28
|
-
Requires-Dist: scipy
|
|
29
|
-
Requires-Dist: matplotlib
|
|
30
29
|
Requires-Dist: h5py
|
|
31
|
-
Requires-Dist: skorch>=1.
|
|
32
|
-
Requires-Dist: torch<3.0,>=2.0
|
|
33
|
-
Requires-Dist: torchaudio<3.0,>=2.0
|
|
34
|
-
Requires-Dist: einops
|
|
30
|
+
Requires-Dist: skorch>=1.3.0
|
|
35
31
|
Requires-Dist: joblib
|
|
36
|
-
Requires-Dist: torchinfo
|
|
32
|
+
Requires-Dist: torchinfo
|
|
37
33
|
Requires-Dist: wfdb
|
|
38
|
-
Requires-Dist: h5py
|
|
39
34
|
Requires-Dist: linear_attention_transformer
|
|
40
35
|
Requires-Dist: docstring_inheritance
|
|
36
|
+
Requires-Dist: rotary_embedding_torch
|
|
41
37
|
Provides-Extra: moabb
|
|
42
|
-
Requires-Dist: moabb>=1.
|
|
43
|
-
Provides-Extra:
|
|
44
|
-
Requires-Dist:
|
|
38
|
+
Requires-Dist: moabb>=1.4.3; extra == "moabb"
|
|
39
|
+
Provides-Extra: eegprep
|
|
40
|
+
Requires-Dist: eegprep[eeglabio]>=0.2.23; extra == "eegprep"
|
|
41
|
+
Provides-Extra: hub
|
|
42
|
+
Requires-Dist: huggingface_hub[torch]>=0.20.0; extra == "hub"
|
|
43
|
+
Requires-Dist: zarr>=3.0; extra == "hub"
|
|
45
44
|
Provides-Extra: tests
|
|
46
45
|
Requires-Dist: pytest; extra == "tests"
|
|
47
46
|
Requires-Dist: pytest-cov; extra == "tests"
|
|
48
47
|
Requires-Dist: codecov; extra == "tests"
|
|
49
48
|
Requires-Dist: pytest_cases; extra == "tests"
|
|
50
49
|
Requires-Dist: mypy; extra == "tests"
|
|
50
|
+
Requires-Dist: transformers>=4.57.0; extra == "tests"
|
|
51
|
+
Provides-Extra: typing
|
|
52
|
+
Requires-Dist: exca==0.4; extra == "typing"
|
|
53
|
+
Requires-Dist: numpydantic>=1.7; extra == "typing"
|
|
51
54
|
Provides-Extra: docs
|
|
52
55
|
Requires-Dist: sphinx_gallery; extra == "docs"
|
|
53
56
|
Requires-Dist: sphinx_rtd_theme; extra == "docs"
|
|
@@ -66,10 +69,22 @@ Requires-Dist: seaborn; extra == "docs"
|
|
|
66
69
|
Requires-Dist: pre-commit; extra == "docs"
|
|
67
70
|
Requires-Dist: openneuro-py; extra == "docs"
|
|
68
71
|
Requires-Dist: plotly; extra == "docs"
|
|
72
|
+
Requires-Dist: shap; extra == "docs"
|
|
73
|
+
Requires-Dist: nbformat; extra == "docs"
|
|
74
|
+
Requires-Dist: transformers; extra == "docs"
|
|
69
75
|
Provides-Extra: all
|
|
70
|
-
Requires-Dist: braindecode[
|
|
76
|
+
Requires-Dist: braindecode[moabb]; extra == "all"
|
|
77
|
+
Requires-Dist: braindecode[tests]; extra == "all"
|
|
78
|
+
Requires-Dist: braindecode[docs]; extra == "all"
|
|
79
|
+
Requires-Dist: braindecode[hub]; extra == "all"
|
|
80
|
+
Requires-Dist: braindecode[eegprep]; extra == "all"
|
|
81
|
+
Requires-Dist: braindecode[typing]; extra == "all"
|
|
71
82
|
Dynamic: license-file
|
|
72
83
|
|
|
84
|
+
.. image:: https://zenodo.org/badge/232335424.svg
|
|
85
|
+
:target: https://doi.org/10.5281/zenodo.8214376
|
|
86
|
+
:alt: DOI
|
|
87
|
+
|
|
73
88
|
.. image:: https://badges.gitter.im/braindecodechat/community.svg
|
|
74
89
|
:alt: Join the chat at https://gitter.im/braindecodechat/community
|
|
75
90
|
:target: https://gitter.im/braindecodechat/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
|
|
@@ -85,6 +100,7 @@ Dynamic: license-file
|
|
|
85
100
|
:target: https://codecov.io/gh/braindecode/braindecode
|
|
86
101
|
:alt: Code Coverage
|
|
87
102
|
|
|
103
|
+
|
|
88
104
|
.. |Braindecode| image:: https://user-images.githubusercontent.com/42702466/177958779-b00628aa-9155-4c51-96d1-d8c345aff575.svg
|
|
89
105
|
.. _braindecode: braindecode.org/
|
|
90
106
|
|
|
@@ -141,7 +157,15 @@ https://gitter.im/braindecodechat/community
|
|
|
141
157
|
Citing
|
|
142
158
|
======
|
|
143
159
|
|
|
144
|
-
If you use
|
|
160
|
+
If you use Braindecode in scientific work, please cite the software using the Zenodo DOI shown in the badge below:
|
|
161
|
+
|
|
162
|
+
.. image:: https://zenodo.org/badge/232335424.svg
|
|
163
|
+
:target: https://doi.org/10.5281/zenodo.8214376
|
|
164
|
+
:alt: DOI
|
|
165
|
+
|
|
166
|
+
Additionally, we highly encourage you to cite the article that originally introduced
|
|
167
|
+
the Braindecode library and has served as a foundational reference for many works
|
|
168
|
+
on deep learning with EEG recordings. Please use the following reference:
|
|
145
169
|
|
|
146
170
|
.. code-block:: bibtex
|
|
147
171
|
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
.. image:: https://zenodo.org/badge/232335424.svg
|
|
2
|
+
:target: https://doi.org/10.5281/zenodo.8214376
|
|
3
|
+
:alt: DOI
|
|
4
|
+
|
|
1
5
|
.. image:: https://badges.gitter.im/braindecodechat/community.svg
|
|
2
6
|
:alt: Join the chat at https://gitter.im/braindecodechat/community
|
|
3
7
|
:target: https://gitter.im/braindecodechat/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
|
|
@@ -13,6 +17,7 @@
|
|
|
13
17
|
:target: https://codecov.io/gh/braindecode/braindecode
|
|
14
18
|
:alt: Code Coverage
|
|
15
19
|
|
|
20
|
+
|
|
16
21
|
.. |Braindecode| image:: https://user-images.githubusercontent.com/42702466/177958779-b00628aa-9155-4c51-96d1-d8c345aff575.svg
|
|
17
22
|
.. _braindecode: braindecode.org/
|
|
18
23
|
|
|
@@ -69,7 +74,15 @@ https://gitter.im/braindecodechat/community
|
|
|
69
74
|
Citing
|
|
70
75
|
======
|
|
71
76
|
|
|
72
|
-
If you use
|
|
77
|
+
If you use Braindecode in scientific work, please cite the software using the Zenodo DOI shown in the badge below:
|
|
78
|
+
|
|
79
|
+
.. image:: https://zenodo.org/badge/232335424.svg
|
|
80
|
+
:target: https://doi.org/10.5281/zenodo.8214376
|
|
81
|
+
:alt: DOI
|
|
82
|
+
|
|
83
|
+
Additionally, we highly encourage you to cite the article that originally introduced
|
|
84
|
+
the Braindecode library and has served as a foundational reference for many works
|
|
85
|
+
on deep learning with EEG recordings. Please use the following reference:
|
|
73
86
|
|
|
74
87
|
.. code-block:: bibtex
|
|
75
88
|
|
|
@@ -5,8 +5,10 @@ Utilities for data augmentation.
|
|
|
5
5
|
from . import functional
|
|
6
6
|
from .base import AugmentedDataLoader, Compose, IdentityTransform, Transform
|
|
7
7
|
from .transforms import (
|
|
8
|
+
AmplitudeScale,
|
|
8
9
|
BandstopFilter,
|
|
9
10
|
ChannelsDropout,
|
|
11
|
+
ChannelsReref,
|
|
10
12
|
ChannelsShuffle,
|
|
11
13
|
ChannelsSymmetry,
|
|
12
14
|
FrequencyShift,
|
|
@@ -46,5 +48,7 @@ __all__ = [
|
|
|
46
48
|
"Mixup",
|
|
47
49
|
"SegmentationReconstruction",
|
|
48
50
|
"MaskEncoding",
|
|
51
|
+
"AmplitudeScale",
|
|
52
|
+
"ChannelsReref",
|
|
49
53
|
"functional",
|
|
50
54
|
]
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Authors: Cédric Rommel <cedric.rommel@inria.fr>
|
|
2
2
|
# Alexandre Gramfort <alexandre.gramfort@inria.fr>
|
|
3
3
|
# Gustavo Rodrigues <gustavenrique01@gmail.com>
|
|
4
|
+
# Bruna Lopes <brunajaflopes@gmail.com>
|
|
4
5
|
#
|
|
5
6
|
# License: BSD (3-clause)
|
|
6
7
|
|
|
@@ -1194,3 +1195,103 @@ def mask_encoding(
|
|
|
1194
1195
|
X[mask] = 0
|
|
1195
1196
|
|
|
1196
1197
|
return X, y # Return the masked tensor and labels
|
|
1198
|
+
|
|
1199
|
+
|
|
1200
|
+
def channels_rereference(
|
|
1201
|
+
X: torch.Tensor,
|
|
1202
|
+
y: torch.Tensor,
|
|
1203
|
+
random_state: int | np.random.RandomState | None = None,
|
|
1204
|
+
) -> tuple[torch.Tensor, torch.Tensor]:
|
|
1205
|
+
"""Randomly re-reference channels in EEG data matrix.
|
|
1206
|
+
|
|
1207
|
+
Part of the augmentations proposed in [1]_
|
|
1208
|
+
|
|
1209
|
+
Parameters
|
|
1210
|
+
----------
|
|
1211
|
+
X : torch.Tensor
|
|
1212
|
+
EEG input example or batch.
|
|
1213
|
+
y : torch.Tensor
|
|
1214
|
+
EEG labels for the example or batch.
|
|
1215
|
+
random_state: int | numpy.random.Generator, optional
|
|
1216
|
+
Seed to be used to instantiate numpy random number generator instance.
|
|
1217
|
+
Defaults to None.
|
|
1218
|
+
|
|
1219
|
+
Returns
|
|
1220
|
+
-------
|
|
1221
|
+
torch.Tensor
|
|
1222
|
+
Transformed inputs.
|
|
1223
|
+
torch.Tensor
|
|
1224
|
+
Transformed labels.
|
|
1225
|
+
|
|
1226
|
+
References
|
|
1227
|
+
----------
|
|
1228
|
+
.. [1] Mohsenvand, M.N., Izadi, M.R. & Maes, P.. (2020). Contrastive
|
|
1229
|
+
Representation Learning for Electroencephalogram Classification. Proceedings
|
|
1230
|
+
of the Machine Learning for Health NeurIPS Workshop, in Proceedings of Machine
|
|
1231
|
+
Learning Research 136:238-253
|
|
1232
|
+
|
|
1233
|
+
"""
|
|
1234
|
+
|
|
1235
|
+
rng = check_random_state(random_state)
|
|
1236
|
+
batch_size, n_channels, _ = X.shape
|
|
1237
|
+
|
|
1238
|
+
ch = rng.randint(0, n_channels, size=batch_size)
|
|
1239
|
+
|
|
1240
|
+
X_ch = X[torch.arange(batch_size), ch, :]
|
|
1241
|
+
X = X - X_ch.unsqueeze(1)
|
|
1242
|
+
X[torch.arange(batch_size), ch, :] = -X_ch
|
|
1243
|
+
|
|
1244
|
+
return X, y
|
|
1245
|
+
|
|
1246
|
+
|
|
1247
|
+
def amplitude_scale(
|
|
1248
|
+
X: torch.Tensor,
|
|
1249
|
+
y: torch.Tensor,
|
|
1250
|
+
scale: tuple,
|
|
1251
|
+
random_state: int | np.random.RandomState | None = None,
|
|
1252
|
+
) -> tuple[torch.Tensor, torch.Tensor]:
|
|
1253
|
+
"""Rescale amplitude of each channel based on a random sampled scaling value.
|
|
1254
|
+
|
|
1255
|
+
Part of the augmentations proposed in [1]_
|
|
1256
|
+
|
|
1257
|
+
Parameters
|
|
1258
|
+
----------
|
|
1259
|
+
X : torch.Tensor
|
|
1260
|
+
EEG input example or batch.
|
|
1261
|
+
y : torch.Tensor
|
|
1262
|
+
EEG labels for the example or batch.
|
|
1263
|
+
scale : tuple of floats
|
|
1264
|
+
Interval from which ypu sample the scaling value
|
|
1265
|
+
random_state: int | numpy.random.Generator, optional
|
|
1266
|
+
Seed to be used to instantiate numpy random number generator instance.
|
|
1267
|
+
Defaults to None.
|
|
1268
|
+
|
|
1269
|
+
Returns
|
|
1270
|
+
-------
|
|
1271
|
+
torch.Tensor
|
|
1272
|
+
Transformed inputs.
|
|
1273
|
+
torch.Tensor
|
|
1274
|
+
Transformed labels.
|
|
1275
|
+
|
|
1276
|
+
References
|
|
1277
|
+
----------
|
|
1278
|
+
.. [1] Mohsenvand, M.N., Izadi, M.R. & Maes, P.. (2020). Contrastive
|
|
1279
|
+
Representation Learning for Electroencephalogram Classification. Proceedings
|
|
1280
|
+
of the Machine Learning for Health NeurIPS Workshop, in Proceedings of Machine
|
|
1281
|
+
Learning Research 136:238-253
|
|
1282
|
+
|
|
1283
|
+
"""
|
|
1284
|
+
|
|
1285
|
+
rng = torch.Generator()
|
|
1286
|
+
rng.manual_seed(random_state)
|
|
1287
|
+
batch_size, n_channels, _ = X.shape
|
|
1288
|
+
|
|
1289
|
+
# Parameter for scaling amplitude / channel / trial
|
|
1290
|
+
l, h = scale
|
|
1291
|
+
s = l + (h - l) * torch.rand(
|
|
1292
|
+
batch_size, n_channels, 1, generator=rng, device=X.device, dtype=X.dtype
|
|
1293
|
+
)
|
|
1294
|
+
|
|
1295
|
+
X = s * X
|
|
1296
|
+
|
|
1297
|
+
return X, y
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Authors: Cédric Rommel <cedric.rommel@inria.fr>
|
|
2
2
|
# Alexandre Gramfort <alexandre.gramfort@inria.fr>
|
|
3
3
|
# Gustavo Rodrigues <gustavenrique01@gmail.com>
|
|
4
|
+
# Bruna Lopes <brunajaflopes@gmail.com>
|
|
4
5
|
#
|
|
5
6
|
# License: BSD (3-clause)
|
|
6
7
|
|
|
@@ -13,9 +14,11 @@ from mne.channels import make_standard_montage
|
|
|
13
14
|
|
|
14
15
|
from .base import Transform
|
|
15
16
|
from .functional import (
|
|
17
|
+
amplitude_scale,
|
|
16
18
|
bandstop_filter,
|
|
17
19
|
channels_dropout,
|
|
18
20
|
channels_permute,
|
|
21
|
+
channels_rereference,
|
|
19
22
|
channels_shuffle,
|
|
20
23
|
frequency_shift,
|
|
21
24
|
ft_surrogate,
|
|
@@ -1271,3 +1274,74 @@ class MaskEncoding(Transform):
|
|
|
1271
1274
|
"segment_length": segment_length,
|
|
1272
1275
|
"n_segments": self.n_segments,
|
|
1273
1276
|
}
|
|
1277
|
+
|
|
1278
|
+
|
|
1279
|
+
class ChannelsReref(Transform):
|
|
1280
|
+
"""Randomly re-reference channels in EEG data matrix.
|
|
1281
|
+
|
|
1282
|
+
Part of the augmentations proposed in [1]_
|
|
1283
|
+
|
|
1284
|
+
Parameters
|
|
1285
|
+
----------
|
|
1286
|
+
probability: float
|
|
1287
|
+
Float setting the probability of applying the operation.
|
|
1288
|
+
random_state: int | numpy.random.Generator, optional
|
|
1289
|
+
Seed to be used to instantiate numpy random number generator instance.
|
|
1290
|
+
Used to decide whether or not to transform given the probability
|
|
1291
|
+
argument, to sample which channels to shuffle and to carry the shuffle.
|
|
1292
|
+
Defaults to None.
|
|
1293
|
+
|
|
1294
|
+
References
|
|
1295
|
+
----------
|
|
1296
|
+
.. [1] Mohsenvand, M.N., Izadi, M.R. & Maes, P.. (2020). Contrastive
|
|
1297
|
+
Representation Learning for Electroencephalogram Classification. Proceedings
|
|
1298
|
+
of the Machine Learning for Health NeurIPS Workshop, in Proceedings of Machine
|
|
1299
|
+
Learning Research 136:238-253 Available from https://proceedings.mlr.press/v136/mohsenvand20a.html.
|
|
1300
|
+
|
|
1301
|
+
"""
|
|
1302
|
+
|
|
1303
|
+
operation = staticmethod(channels_rereference) # type: ignore[assignment]
|
|
1304
|
+
|
|
1305
|
+
def __init__(self, probability, random_state=None):
|
|
1306
|
+
super().__init__(probability=probability, random_state=random_state)
|
|
1307
|
+
|
|
1308
|
+
def get_augmentation_params(self, *batch):
|
|
1309
|
+
"""Return transform parameters"""
|
|
1310
|
+
return {
|
|
1311
|
+
"random_state": self.rng,
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
|
|
1315
|
+
class AmplitudeScale(Transform):
|
|
1316
|
+
"""Rescale amplitude based on a random sampled scaling value.
|
|
1317
|
+
|
|
1318
|
+
Part of the augmentations proposed in [1]_
|
|
1319
|
+
|
|
1320
|
+
Parameters
|
|
1321
|
+
----------
|
|
1322
|
+
probability: float
|
|
1323
|
+
Float setting the probability of applying the operation.
|
|
1324
|
+
random_state: int | numpy.random.Generator, optional
|
|
1325
|
+
Seed to be used to instantiate numpy random number generator instance.
|
|
1326
|
+
Used to decide whether or not to transform given the probability
|
|
1327
|
+
argument, to sample which channels to shuffle and to carry the shuffle.
|
|
1328
|
+
Defaults to None.
|
|
1329
|
+
|
|
1330
|
+
References
|
|
1331
|
+
----------
|
|
1332
|
+
.. [1] Mohsenvand, M.N., Izadi, M.R. & Maes, P.. (2020). Contrastive
|
|
1333
|
+
Representation Learning for Electroencephalogram Classification. Proceedings
|
|
1334
|
+
of the Machine Learning for Health NeurIPS Workshop, in Proceedings of Machine
|
|
1335
|
+
Learning Research 136:238-253 Available from https://proceedings.mlr.press/v136/mohsenvand20a.html.
|
|
1336
|
+
|
|
1337
|
+
"""
|
|
1338
|
+
|
|
1339
|
+
operation = staticmethod(amplitude_scale) # type: ignore[assignment]
|
|
1340
|
+
|
|
1341
|
+
def __init__(self, probability, interval=(0.5, 2), random_state=None):
|
|
1342
|
+
super().__init__(probability=probability, random_state=random_state)
|
|
1343
|
+
self.scale = interval
|
|
1344
|
+
|
|
1345
|
+
def get_augmentation_params(self, *batch):
|
|
1346
|
+
"""Return transform parameters"""
|
|
1347
|
+
return {"random_state": self.rng, "scale": self.scale}
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
import warnings
|
|
10
10
|
|
|
11
|
-
import numpy as np
|
|
12
11
|
from skorch import NeuralNet
|
|
13
12
|
from skorch.callbacks import EpochScoring
|
|
14
13
|
from skorch.classifier import NeuralNetClassifier
|
|
@@ -237,13 +236,9 @@ class EEGClassifier(_EEGNeuralNet, NeuralNetClassifier):
|
|
|
237
236
|
num_workers=self.get_iterator(X, training=False).loader.num_workers,
|
|
238
237
|
)
|
|
239
238
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
assert set(classes_y) <= set(classes)
|
|
244
|
-
else:
|
|
245
|
-
classes = classes_y
|
|
246
|
-
return len(classes)
|
|
239
|
+
@property
|
|
240
|
+
def mode(self):
|
|
241
|
+
return "classification"
|
|
247
242
|
|
|
248
243
|
# Only add the 'accuracy' callback if we are not in cropped mode.
|
|
249
244
|
@property
|
{braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/datasets/__init__.py
RENAMED
|
@@ -11,9 +11,20 @@ from .base import (
|
|
|
11
11
|
)
|
|
12
12
|
from .bcicomp import BCICompetitionIVDataset4
|
|
13
13
|
from .bids import BIDSDataset, BIDSEpochsDataset
|
|
14
|
+
from .bids_format import (
|
|
15
|
+
BIDSDerivativesLayout,
|
|
16
|
+
create_channels_tsv,
|
|
17
|
+
create_eeg_json_sidecar,
|
|
18
|
+
create_events_tsv,
|
|
19
|
+
create_participants_tsv,
|
|
20
|
+
description_to_bids_path,
|
|
21
|
+
make_dataset_description,
|
|
22
|
+
)
|
|
23
|
+
from .chb_mit import CHBMIT
|
|
14
24
|
from .mne import create_from_mne_epochs, create_from_mne_raw
|
|
15
|
-
from .moabb import
|
|
25
|
+
from .moabb import BNCI2014_001, HGD, MOABBDataset
|
|
16
26
|
from .nmt import NMT
|
|
27
|
+
from .siena import SIENA
|
|
17
28
|
from .sleep_physio_challe_18 import SleepPhysionetChallenge2018
|
|
18
29
|
from .sleep_physionet import SleepPhysionet
|
|
19
30
|
from .tuh import TUH, TUHAbnormal
|
|
@@ -27,14 +38,23 @@ __all__ = [
|
|
|
27
38
|
"BaseConcatDataset",
|
|
28
39
|
"BIDSDataset",
|
|
29
40
|
"BIDSEpochsDataset",
|
|
41
|
+
"BIDSDerivativesLayout",
|
|
42
|
+
"create_events_tsv",
|
|
43
|
+
"create_participants_tsv",
|
|
44
|
+
"create_channels_tsv",
|
|
45
|
+
"create_eeg_json_sidecar",
|
|
46
|
+
"make_dataset_description",
|
|
47
|
+
"description_to_bids_path",
|
|
30
48
|
"MOABBDataset",
|
|
31
49
|
"HGD",
|
|
32
|
-
"
|
|
50
|
+
"BNCI2014_001",
|
|
33
51
|
"create_from_mne_raw",
|
|
34
52
|
"create_from_mne_epochs",
|
|
35
53
|
"TUH",
|
|
36
54
|
"TUHAbnormal",
|
|
55
|
+
"SIENA",
|
|
37
56
|
"NMT",
|
|
57
|
+
"CHBMIT",
|
|
38
58
|
"SleepPhysionet",
|
|
39
59
|
"SleepPhysionetChallenge2018",
|
|
40
60
|
"create_from_X_y",
|
{braindecode-1.3.0.dev173767962 → braindecode-1.3.0.dev174201910}/braindecode/datasets/base.py
RENAMED
|
@@ -19,7 +19,7 @@ import warnings
|
|
|
19
19
|
from abc import abstractmethod
|
|
20
20
|
from collections.abc import Callable
|
|
21
21
|
from glob import glob
|
|
22
|
-
from typing import Generic, Iterable, no_type_check
|
|
22
|
+
from typing import Any, Generic, Iterable, no_type_check
|
|
23
23
|
|
|
24
24
|
import mne.io
|
|
25
25
|
import numpy as np
|
|
@@ -28,6 +28,9 @@ from mne.utils.docs import deprecated
|
|
|
28
28
|
from torch.utils.data import ConcatDataset, Dataset
|
|
29
29
|
from typing_extensions import TypeVar
|
|
30
30
|
|
|
31
|
+
from .hub import HubDatasetMixin
|
|
32
|
+
from .registry import register_dataset
|
|
33
|
+
|
|
31
34
|
|
|
32
35
|
def _create_description(description) -> pd.Series:
|
|
33
36
|
if description is not None:
|
|
@@ -97,6 +100,7 @@ class RecordDataset(Dataset[tuple[np.ndarray, int | str, tuple[int, int, int]]])
|
|
|
97
100
|
T = TypeVar("T", bound=RecordDataset)
|
|
98
101
|
|
|
99
102
|
|
|
103
|
+
@register_dataset
|
|
100
104
|
class RawDataset(RecordDataset):
|
|
101
105
|
"""Returns samples from an mne.io.Raw object along with a target.
|
|
102
106
|
|
|
@@ -129,6 +133,7 @@ class RawDataset(RecordDataset):
|
|
|
129
133
|
|
|
130
134
|
# save target name for load/save later
|
|
131
135
|
self.target_name = self._target_name(target_name)
|
|
136
|
+
self.raw_preproc_kwargs: list[dict[str, Any]] = []
|
|
132
137
|
|
|
133
138
|
def __getitem__(self, index):
|
|
134
139
|
X = self.raw[:, index][0]
|
|
@@ -176,10 +181,12 @@ class RawDataset(RecordDataset):
|
|
|
176
181
|
"If you want to type a Braindecode dataset (i.e. RawDataset|EEGWindowsDataset|WindowsDataset), "
|
|
177
182
|
"use the RecordDataset class instead."
|
|
178
183
|
)
|
|
184
|
+
@register_dataset
|
|
179
185
|
class BaseDataset(RawDataset):
|
|
180
186
|
pass
|
|
181
187
|
|
|
182
188
|
|
|
189
|
+
@register_dataset
|
|
183
190
|
class EEGWindowsDataset(RecordDataset):
|
|
184
191
|
"""Returns windows from an mne.Raw object, its window indices, along with a target.
|
|
185
192
|
|
|
@@ -235,6 +242,7 @@ class EEGWindowsDataset(RecordDataset):
|
|
|
235
242
|
].to_numpy()
|
|
236
243
|
if self.targets_from == "metadata":
|
|
237
244
|
self.y = metadata.loc[:, "target"].to_list()
|
|
245
|
+
self.raw_preproc_kwargs: list[dict[str, Any]] = []
|
|
238
246
|
|
|
239
247
|
def __getitem__(self, index: int):
|
|
240
248
|
"""Get a window and its target.
|
|
@@ -285,6 +293,7 @@ class EEGWindowsDataset(RecordDataset):
|
|
|
285
293
|
return len(self.crop_inds)
|
|
286
294
|
|
|
287
295
|
|
|
296
|
+
@register_dataset
|
|
288
297
|
class WindowsDataset(RecordDataset):
|
|
289
298
|
"""Returns windows from an mne.Epochs object along with a target.
|
|
290
299
|
|
|
@@ -334,6 +343,8 @@ class WindowsDataset(RecordDataset):
|
|
|
334
343
|
].to_numpy()
|
|
335
344
|
if self.targets_from == "metadata":
|
|
336
345
|
self.y = metadata.loc[:, "target"].to_list()
|
|
346
|
+
self.raw_preproc_kwargs: list[dict[str, Any]] = []
|
|
347
|
+
self.window_preproc_kwargs: list[dict[str, Any]] = []
|
|
337
348
|
|
|
338
349
|
def __getitem__(self, index: int):
|
|
339
350
|
"""Get a window and its target.
|
|
@@ -374,12 +385,16 @@ class WindowsDataset(RecordDataset):
|
|
|
374
385
|
return len(self.windows.events)
|
|
375
386
|
|
|
376
387
|
|
|
377
|
-
|
|
388
|
+
@register_dataset
|
|
389
|
+
class BaseConcatDataset(ConcatDataset, HubDatasetMixin, Generic[T]):
|
|
378
390
|
"""A base class for concatenated datasets.
|
|
379
391
|
|
|
380
392
|
Holds either mne.Raw or mne.Epoch in self.datasets and has
|
|
381
393
|
a pandas DataFrame with additional description.
|
|
382
394
|
|
|
395
|
+
Includes Hugging Face Hub integration via HubDatasetMixin for
|
|
396
|
+
uploading and downloading datasets.
|
|
397
|
+
|
|
383
398
|
Parameters
|
|
384
399
|
----------
|
|
385
400
|
list_of_ds : list
|
|
@@ -794,7 +809,7 @@ class BaseConcatDataset(ConcatDataset, Generic[T]):
|
|
|
794
809
|
kwargs = getattr(ds, kwargs_name)
|
|
795
810
|
if kwargs is not None:
|
|
796
811
|
with open(kwargs_file_path, "w") as f:
|
|
797
|
-
json.dump(kwargs, f)
|
|
812
|
+
json.dump(kwargs, f, indent=2)
|
|
798
813
|
|
|
799
814
|
@staticmethod
|
|
800
815
|
def _save_target_name(sub_dir, ds):
|