Braindecode 1.3.0.dev168090315__tar.gz → 1.3.0.dev168496007__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.dev168090315/braindecode.egg-info → braindecode-1.3.0.dev168496007}/PKG-INFO +21 -43
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/README.rst +1 -14
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/augmentation/__init__.py +0 -4
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/augmentation/functional.py +0 -101
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/augmentation/transforms.py +0 -74
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/classifier.py +8 -3
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/datasets/__init__.py +2 -6
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/datasets/base.py +3 -18
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/datasets/moabb.py +5 -15
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/datasets/nmt.py +43 -38
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/datautil/__init__.py +1 -13
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/datautil/serialization.py +2 -1
- braindecode-1.3.0.dev168496007/braindecode/datautil/util.py +41 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/eegneuralnet.py +48 -20
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/__init__.py +1 -14
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/atcnet.py +12 -12
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/attentionbasenet.py +5 -5
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/attn_sleep.py +8 -10
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/bendr.py +2 -2
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/biot.py +25 -27
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/contrawr.py +2 -2
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/ctnet.py +34 -34
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/deep4.py +4 -4
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/deepsleepnet.py +4 -4
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/eegconformer.py +23 -28
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/eeginception_erp.py +1 -1
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/eeginception_mi.py +3 -3
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/eegitnet.py +3 -3
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/eegnet.py +1 -1
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/eegnex.py +1 -1
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/eegsimpleconv.py +1 -1
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/eegtcnet.py +3 -3
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/fbcnet.py +1 -1
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/fblightconvnet.py +1 -1
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/fbmsnet.py +1 -1
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/hybrid.py +1 -1
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/ifnet.py +2 -2
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/labram.py +40 -40
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/msvtnet.py +10 -10
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/patchedtransformer.py +48 -48
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/sccnet.py +1 -1
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/shallow_fbcsp.py +2 -4
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/signal_jepa.py +4 -4
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/sinc_shallow.py +2 -1
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/sleep_stager_blanco_2020.py +1 -1
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/sleep_stager_chambon_2018.py +1 -1
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/sparcnet.py +4 -4
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/sstdpn.py +2 -2
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/summary.csv +15 -19
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/syncnet.py +1 -1
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/tcn.py +3 -3
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/tidnet.py +1 -1
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/tsinception.py +1 -1
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/usleep.py +3 -3
- braindecode-1.3.0.dev168496007/braindecode/models/util.py +132 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/modules/blocks.py +1 -3
- braindecode-1.3.0.dev168496007/braindecode/preprocessing/__init__.py +61 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/preprocessing/eegprep_preprocess.py +19 -134
- braindecode-1.3.0.dev168496007/braindecode/preprocessing/mne_preprocess.py +77 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/preprocessing/preprocess.py +39 -134
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/preprocessing/util.py +0 -11
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/regressor.py +7 -3
- braindecode-1.3.0.dev168496007/braindecode/version.py +1 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007/braindecode.egg-info}/PKG-INFO +21 -43
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode.egg-info/SOURCES.txt +0 -13
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode.egg-info/requires.txt +15 -24
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/docs/api.rst +20 -124
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/docs/cite.rst +2 -9
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/docs/conf.py +14 -72
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/docs/index.rst +4 -4
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/docs/install/install_pip.rst +1 -7
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/docs/install/install_source.rst +1 -1
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/docs/models/categorization/attention.rst +5 -5
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/docs/models/categorization/lbm.rst +5 -5
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/docs/models/models_categorization.rst +8 -8
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/docs/models/models_table.rst +2 -2
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/docs/whats_new.rst +0 -32
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/pyproject.toml +22 -37
- braindecode-1.3.0.dev168090315/braindecode/datasets/chb_mit.py +0 -172
- braindecode-1.3.0.dev168090315/braindecode/datasets/hub.py +0 -945
- braindecode-1.3.0.dev168090315/braindecode/datasets/hub_validation.py +0 -113
- braindecode-1.3.0.dev168090315/braindecode/datasets/registry.py +0 -120
- braindecode-1.3.0.dev168090315/braindecode/datasets/siena.py +0 -164
- braindecode-1.3.0.dev168090315/braindecode/datasets/utils.py +0 -67
- braindecode-1.3.0.dev168090315/braindecode/datautil/channel_utils.py +0 -114
- braindecode-1.3.0.dev168090315/braindecode/datautil/hub_formats.py +0 -180
- braindecode-1.3.0.dev168090315/braindecode/datautil/util.py +0 -155
- braindecode-1.3.0.dev168090315/braindecode/models/config.py +0 -233
- braindecode-1.3.0.dev168090315/braindecode/models/eegsym.py +0 -917
- braindecode-1.3.0.dev168090315/braindecode/models/luna.py +0 -836
- braindecode-1.3.0.dev168090315/braindecode/models/medformer.py +0 -758
- braindecode-1.3.0.dev168090315/braindecode/models/reve.py +0 -813
- braindecode-1.3.0.dev168090315/braindecode/models/util.py +0 -368
- braindecode-1.3.0.dev168090315/braindecode/preprocessing/__init__.py +0 -271
- braindecode-1.3.0.dev168090315/braindecode/preprocessing/mne_preprocess.py +0 -240
- braindecode-1.3.0.dev168090315/braindecode/version.py +0 -1
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/LICENSE.txt +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/MANIFEST.in +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/NOTICE.txt +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/__init__.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/augmentation/base.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/datasets/bbci.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/datasets/bcicomp.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/datasets/bids.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/datasets/experimental.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/datasets/mne.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/datasets/sleep_physio_challe_18.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/datasets/sleep_physionet.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/datasets/tuh.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/datasets/xy.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/functional/__init__.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/functional/functions.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/functional/initialization.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/base.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/models/eegminer.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/modules/__init__.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/modules/activation.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/modules/attention.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/modules/convolution.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/modules/filter.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/modules/layers.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/modules/linear.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/modules/parametrization.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/modules/stats.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/modules/util.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/modules/wrapper.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/preprocessing/windowers.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/samplers/__init__.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/samplers/base.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/samplers/ssl.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/training/__init__.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/training/callbacks.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/training/losses.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/training/scoring.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/util.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/visualization/__init__.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/visualization/confusion_matrices.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/visualization/gradients.py +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode.egg-info/dependency_links.txt +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode.egg-info/top_level.txt +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/docs/Makefile +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/docs/_templates/autosummary/class.rst +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/docs/_templates/autosummary/function.rst +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/docs/help.rst +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/docs/install/install.rst +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/docs/models/categorization/channel.rst +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/docs/models/categorization/convolution.rst +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/docs/models/categorization/filterbank.rst +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/docs/models/categorization/gnn.rst +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/docs/models/categorization/interpretable.rst +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/docs/models/categorization/recurrent.rst +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/docs/models/categorization/spd.rst +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/docs/models/models.rst +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/docs/models/models_visualization.rst +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/docs/sg_execution_times.rst +0 -0
- {braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/setup.cfg +0 -0
{braindecode-1.3.0.dev168090315/braindecode.egg-info → braindecode-1.3.0.dev168496007}/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.dev168496007
|
|
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>
|
|
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,43 +14,42 @@ 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
|
|
17
18
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
19
|
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
-
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
-
Requires-Python: >=3.11
|
|
20
|
+
Requires-Python: >=3.10
|
|
22
21
|
Description-Content-Type: text/x-rst
|
|
23
22
|
License-File: LICENSE.txt
|
|
24
23
|
License-File: NOTICE.txt
|
|
25
|
-
Requires-Dist:
|
|
26
|
-
Requires-Dist: torchaudio>=2.0
|
|
27
|
-
Requires-Dist: mne>=1.11.0
|
|
24
|
+
Requires-Dist: mne>=1.10.0
|
|
28
25
|
Requires-Dist: mne_bids>=0.16
|
|
26
|
+
Requires-Dist: numpy
|
|
27
|
+
Requires-Dist: pandas
|
|
28
|
+
Requires-Dist: scipy
|
|
29
|
+
Requires-Dist: matplotlib
|
|
29
30
|
Requires-Dist: h5py
|
|
30
|
-
Requires-Dist: skorch>=1.
|
|
31
|
+
Requires-Dist: skorch>=1.2.0
|
|
32
|
+
Requires-Dist: torch<3.0,>=2.0
|
|
33
|
+
Requires-Dist: torchaudio<3.0,>=2.0
|
|
34
|
+
Requires-Dist: einops
|
|
31
35
|
Requires-Dist: joblib
|
|
32
|
-
Requires-Dist: torchinfo
|
|
36
|
+
Requires-Dist: torchinfo~=1.8
|
|
33
37
|
Requires-Dist: wfdb
|
|
38
|
+
Requires-Dist: h5py
|
|
34
39
|
Requires-Dist: linear_attention_transformer
|
|
35
40
|
Requires-Dist: docstring_inheritance
|
|
36
|
-
Requires-Dist: rotary_embedding_torch
|
|
37
41
|
Provides-Extra: moabb
|
|
38
|
-
Requires-Dist: moabb>=1.
|
|
42
|
+
Requires-Dist: moabb>=1.2.0; extra == "moabb"
|
|
39
43
|
Provides-Extra: eegprep
|
|
40
|
-
Requires-Dist: eegprep[eeglabio]>=0.
|
|
41
|
-
Provides-Extra:
|
|
42
|
-
Requires-Dist: huggingface_hub[torch]>=0.20.0; extra == "
|
|
43
|
-
Requires-Dist: zarr>=3.0; extra == "hub"
|
|
44
|
+
Requires-Dist: eegprep[eeglabio]>=0.1.1; extra == "eegprep"
|
|
45
|
+
Provides-Extra: hug
|
|
46
|
+
Requires-Dist: huggingface_hub[torch]>=0.20.0; extra == "hug"
|
|
44
47
|
Provides-Extra: tests
|
|
45
48
|
Requires-Dist: pytest; extra == "tests"
|
|
46
49
|
Requires-Dist: pytest-cov; extra == "tests"
|
|
47
50
|
Requires-Dist: codecov; extra == "tests"
|
|
48
51
|
Requires-Dist: pytest_cases; extra == "tests"
|
|
49
52
|
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"
|
|
54
53
|
Provides-Extra: docs
|
|
55
54
|
Requires-Dist: sphinx_gallery; extra == "docs"
|
|
56
55
|
Requires-Dist: sphinx_rtd_theme; extra == "docs"
|
|
@@ -69,22 +68,10 @@ Requires-Dist: seaborn; extra == "docs"
|
|
|
69
68
|
Requires-Dist: pre-commit; extra == "docs"
|
|
70
69
|
Requires-Dist: openneuro-py; extra == "docs"
|
|
71
70
|
Requires-Dist: plotly; extra == "docs"
|
|
72
|
-
Requires-Dist: shap; extra == "docs"
|
|
73
|
-
Requires-Dist: nbformat; extra == "docs"
|
|
74
|
-
Requires-Dist: transformers; extra == "docs"
|
|
75
71
|
Provides-Extra: all
|
|
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"
|
|
72
|
+
Requires-Dist: braindecode[docs,eegprep,hug,moabb,tests]; extra == "all"
|
|
82
73
|
Dynamic: license-file
|
|
83
74
|
|
|
84
|
-
.. image:: https://zenodo.org/badge/232335424.svg
|
|
85
|
-
:target: https://doi.org/10.5281/zenodo.8214376
|
|
86
|
-
:alt: DOI
|
|
87
|
-
|
|
88
75
|
.. image:: https://badges.gitter.im/braindecodechat/community.svg
|
|
89
76
|
:alt: Join the chat at https://gitter.im/braindecodechat/community
|
|
90
77
|
:target: https://gitter.im/braindecodechat/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
|
|
@@ -100,7 +87,6 @@ Dynamic: license-file
|
|
|
100
87
|
:target: https://codecov.io/gh/braindecode/braindecode
|
|
101
88
|
:alt: Code Coverage
|
|
102
89
|
|
|
103
|
-
|
|
104
90
|
.. |Braindecode| image:: https://user-images.githubusercontent.com/42702466/177958779-b00628aa-9155-4c51-96d1-d8c345aff575.svg
|
|
105
91
|
.. _braindecode: braindecode.org/
|
|
106
92
|
|
|
@@ -157,15 +143,7 @@ https://gitter.im/braindecodechat/community
|
|
|
157
143
|
Citing
|
|
158
144
|
======
|
|
159
145
|
|
|
160
|
-
If you use
|
|
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:
|
|
146
|
+
If you use this code in a scientific publication, please cite us as:
|
|
169
147
|
|
|
170
148
|
.. code-block:: bibtex
|
|
171
149
|
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
.. image:: https://zenodo.org/badge/232335424.svg
|
|
2
|
-
:target: https://doi.org/10.5281/zenodo.8214376
|
|
3
|
-
:alt: DOI
|
|
4
|
-
|
|
5
1
|
.. image:: https://badges.gitter.im/braindecodechat/community.svg
|
|
6
2
|
:alt: Join the chat at https://gitter.im/braindecodechat/community
|
|
7
3
|
:target: https://gitter.im/braindecodechat/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
|
|
@@ -17,7 +13,6 @@
|
|
|
17
13
|
:target: https://codecov.io/gh/braindecode/braindecode
|
|
18
14
|
:alt: Code Coverage
|
|
19
15
|
|
|
20
|
-
|
|
21
16
|
.. |Braindecode| image:: https://user-images.githubusercontent.com/42702466/177958779-b00628aa-9155-4c51-96d1-d8c345aff575.svg
|
|
22
17
|
.. _braindecode: braindecode.org/
|
|
23
18
|
|
|
@@ -74,15 +69,7 @@ https://gitter.im/braindecodechat/community
|
|
|
74
69
|
Citing
|
|
75
70
|
======
|
|
76
71
|
|
|
77
|
-
If you use
|
|
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:
|
|
72
|
+
If you use this code in a scientific publication, please cite us as:
|
|
86
73
|
|
|
87
74
|
.. code-block:: bibtex
|
|
88
75
|
|
|
@@ -5,10 +5,8 @@ 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,
|
|
9
8
|
BandstopFilter,
|
|
10
9
|
ChannelsDropout,
|
|
11
|
-
ChannelsReref,
|
|
12
10
|
ChannelsShuffle,
|
|
13
11
|
ChannelsSymmetry,
|
|
14
12
|
FrequencyShift,
|
|
@@ -48,7 +46,5 @@ __all__ = [
|
|
|
48
46
|
"Mixup",
|
|
49
47
|
"SegmentationReconstruction",
|
|
50
48
|
"MaskEncoding",
|
|
51
|
-
"AmplitudeScale",
|
|
52
|
-
"ChannelsReref",
|
|
53
49
|
"functional",
|
|
54
50
|
]
|
|
@@ -1,7 +1,6 @@
|
|
|
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>
|
|
5
4
|
#
|
|
6
5
|
# License: BSD (3-clause)
|
|
7
6
|
|
|
@@ -1195,103 +1194,3 @@ def mask_encoding(
|
|
|
1195
1194
|
X[mask] = 0
|
|
1196
1195
|
|
|
1197
1196
|
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,7 +1,6 @@
|
|
|
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>
|
|
5
4
|
#
|
|
6
5
|
# License: BSD (3-clause)
|
|
7
6
|
|
|
@@ -14,11 +13,9 @@ from mne.channels import make_standard_montage
|
|
|
14
13
|
|
|
15
14
|
from .base import Transform
|
|
16
15
|
from .functional import (
|
|
17
|
-
amplitude_scale,
|
|
18
16
|
bandstop_filter,
|
|
19
17
|
channels_dropout,
|
|
20
18
|
channels_permute,
|
|
21
|
-
channels_rereference,
|
|
22
19
|
channels_shuffle,
|
|
23
20
|
frequency_shift,
|
|
24
21
|
ft_surrogate,
|
|
@@ -1274,74 +1271,3 @@ class MaskEncoding(Transform):
|
|
|
1274
1271
|
"segment_length": segment_length,
|
|
1275
1272
|
"n_segments": self.n_segments,
|
|
1276
1273
|
}
|
|
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,6 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import warnings
|
|
10
10
|
|
|
11
|
+
import numpy as np
|
|
11
12
|
from skorch import NeuralNet
|
|
12
13
|
from skorch.callbacks import EpochScoring
|
|
13
14
|
from skorch.classifier import NeuralNetClassifier
|
|
@@ -236,9 +237,13 @@ class EEGClassifier(_EEGNeuralNet, NeuralNetClassifier):
|
|
|
236
237
|
num_workers=self.get_iterator(X, training=False).loader.num_workers,
|
|
237
238
|
)
|
|
238
239
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
240
|
+
def _get_n_outputs(self, y, classes):
|
|
241
|
+
classes_y = np.unique(y)
|
|
242
|
+
if classes is not None:
|
|
243
|
+
assert set(classes_y) <= set(classes)
|
|
244
|
+
else:
|
|
245
|
+
classes = classes_y
|
|
246
|
+
return len(classes)
|
|
242
247
|
|
|
243
248
|
# Only add the 'accuracy' callback if we are not in cropped mode.
|
|
244
249
|
@property
|
{braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/datasets/__init__.py
RENAMED
|
@@ -11,11 +11,9 @@ from .base import (
|
|
|
11
11
|
)
|
|
12
12
|
from .bcicomp import BCICompetitionIVDataset4
|
|
13
13
|
from .bids import BIDSDataset, BIDSEpochsDataset
|
|
14
|
-
from .chb_mit import CHBMIT
|
|
15
14
|
from .mne import create_from_mne_epochs, create_from_mne_raw
|
|
16
|
-
from .moabb import
|
|
15
|
+
from .moabb import BNCI2014001, HGD, MOABBDataset
|
|
17
16
|
from .nmt import NMT
|
|
18
|
-
from .siena import SIENA
|
|
19
17
|
from .sleep_physio_challe_18 import SleepPhysionetChallenge2018
|
|
20
18
|
from .sleep_physionet import SleepPhysionet
|
|
21
19
|
from .tuh import TUH, TUHAbnormal
|
|
@@ -31,14 +29,12 @@ __all__ = [
|
|
|
31
29
|
"BIDSEpochsDataset",
|
|
32
30
|
"MOABBDataset",
|
|
33
31
|
"HGD",
|
|
34
|
-
"
|
|
32
|
+
"BNCI2014001",
|
|
35
33
|
"create_from_mne_raw",
|
|
36
34
|
"create_from_mne_epochs",
|
|
37
35
|
"TUH",
|
|
38
36
|
"TUHAbnormal",
|
|
39
|
-
"SIENA",
|
|
40
37
|
"NMT",
|
|
41
|
-
"CHBMIT",
|
|
42
38
|
"SleepPhysionet",
|
|
43
39
|
"SleepPhysionetChallenge2018",
|
|
44
40
|
"create_from_X_y",
|
{braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/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
|
|
22
|
+
from typing import Generic, Iterable, no_type_check
|
|
23
23
|
|
|
24
24
|
import mne.io
|
|
25
25
|
import numpy as np
|
|
@@ -28,9 +28,6 @@ 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
|
-
|
|
34
31
|
|
|
35
32
|
def _create_description(description) -> pd.Series:
|
|
36
33
|
if description is not None:
|
|
@@ -100,7 +97,6 @@ class RecordDataset(Dataset[tuple[np.ndarray, int | str, tuple[int, int, int]]])
|
|
|
100
97
|
T = TypeVar("T", bound=RecordDataset)
|
|
101
98
|
|
|
102
99
|
|
|
103
|
-
@register_dataset
|
|
104
100
|
class RawDataset(RecordDataset):
|
|
105
101
|
"""Returns samples from an mne.io.Raw object along with a target.
|
|
106
102
|
|
|
@@ -133,7 +129,6 @@ class RawDataset(RecordDataset):
|
|
|
133
129
|
|
|
134
130
|
# save target name for load/save later
|
|
135
131
|
self.target_name = self._target_name(target_name)
|
|
136
|
-
self.raw_preproc_kwargs: list[dict[str, Any]] = []
|
|
137
132
|
|
|
138
133
|
def __getitem__(self, index):
|
|
139
134
|
X = self.raw[:, index][0]
|
|
@@ -181,12 +176,10 @@ class RawDataset(RecordDataset):
|
|
|
181
176
|
"If you want to type a Braindecode dataset (i.e. RawDataset|EEGWindowsDataset|WindowsDataset), "
|
|
182
177
|
"use the RecordDataset class instead."
|
|
183
178
|
)
|
|
184
|
-
@register_dataset
|
|
185
179
|
class BaseDataset(RawDataset):
|
|
186
180
|
pass
|
|
187
181
|
|
|
188
182
|
|
|
189
|
-
@register_dataset
|
|
190
183
|
class EEGWindowsDataset(RecordDataset):
|
|
191
184
|
"""Returns windows from an mne.Raw object, its window indices, along with a target.
|
|
192
185
|
|
|
@@ -242,7 +235,6 @@ class EEGWindowsDataset(RecordDataset):
|
|
|
242
235
|
].to_numpy()
|
|
243
236
|
if self.targets_from == "metadata":
|
|
244
237
|
self.y = metadata.loc[:, "target"].to_list()
|
|
245
|
-
self.raw_preproc_kwargs: list[dict[str, Any]] = []
|
|
246
238
|
|
|
247
239
|
def __getitem__(self, index: int):
|
|
248
240
|
"""Get a window and its target.
|
|
@@ -293,7 +285,6 @@ class EEGWindowsDataset(RecordDataset):
|
|
|
293
285
|
return len(self.crop_inds)
|
|
294
286
|
|
|
295
287
|
|
|
296
|
-
@register_dataset
|
|
297
288
|
class WindowsDataset(RecordDataset):
|
|
298
289
|
"""Returns windows from an mne.Epochs object along with a target.
|
|
299
290
|
|
|
@@ -343,8 +334,6 @@ class WindowsDataset(RecordDataset):
|
|
|
343
334
|
].to_numpy()
|
|
344
335
|
if self.targets_from == "metadata":
|
|
345
336
|
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]] = []
|
|
348
337
|
|
|
349
338
|
def __getitem__(self, index: int):
|
|
350
339
|
"""Get a window and its target.
|
|
@@ -385,16 +374,12 @@ class WindowsDataset(RecordDataset):
|
|
|
385
374
|
return len(self.windows.events)
|
|
386
375
|
|
|
387
376
|
|
|
388
|
-
|
|
389
|
-
class BaseConcatDataset(ConcatDataset, HubDatasetMixin, Generic[T]):
|
|
377
|
+
class BaseConcatDataset(ConcatDataset, Generic[T]):
|
|
390
378
|
"""A base class for concatenated datasets.
|
|
391
379
|
|
|
392
380
|
Holds either mne.Raw or mne.Epoch in self.datasets and has
|
|
393
381
|
a pandas DataFrame with additional description.
|
|
394
382
|
|
|
395
|
-
Includes Hugging Face Hub integration via HubDatasetMixin for
|
|
396
|
-
uploading and downloading datasets.
|
|
397
|
-
|
|
398
383
|
Parameters
|
|
399
384
|
----------
|
|
400
385
|
list_of_ds : list
|
|
@@ -809,7 +794,7 @@ class BaseConcatDataset(ConcatDataset, HubDatasetMixin, Generic[T]):
|
|
|
809
794
|
kwargs = getattr(ds, kwargs_name)
|
|
810
795
|
if kwargs is not None:
|
|
811
796
|
with open(kwargs_file_path, "w") as f:
|
|
812
|
-
json.dump(kwargs, f
|
|
797
|
+
json.dump(kwargs, f)
|
|
813
798
|
|
|
814
799
|
@staticmethod
|
|
815
800
|
def _save_target_name(sub_dir, ds):
|
{braindecode-1.3.0.dev168090315 → braindecode-1.3.0.dev168496007}/braindecode/datasets/moabb.py
RENAMED
|
@@ -15,7 +15,6 @@ from typing import Any
|
|
|
15
15
|
|
|
16
16
|
import mne
|
|
17
17
|
import pandas as pd
|
|
18
|
-
from mne.utils import deprecated
|
|
19
18
|
|
|
20
19
|
from braindecode.util import _update_moabb_docstring
|
|
21
20
|
|
|
@@ -170,8 +169,8 @@ class MOABBDataset(BaseConcatDataset):
|
|
|
170
169
|
super().__init__(all_base_ds)
|
|
171
170
|
|
|
172
171
|
|
|
173
|
-
class
|
|
174
|
-
doc = """See moabb.datasets.bnci.
|
|
172
|
+
class BNCI2014001(MOABBDataset):
|
|
173
|
+
doc = """See moabb.datasets.bnci.BNCI2014001
|
|
175
174
|
|
|
176
175
|
Parameters
|
|
177
176
|
----------
|
|
@@ -180,14 +179,14 @@ class BNCI2014_001(MOABBDataset):
|
|
|
180
179
|
subjects is fetched.
|
|
181
180
|
"""
|
|
182
181
|
try:
|
|
183
|
-
from moabb.datasets import
|
|
182
|
+
from moabb.datasets import BNCI2014001
|
|
184
183
|
|
|
185
|
-
__doc__ = _update_moabb_docstring(
|
|
184
|
+
__doc__ = _update_moabb_docstring(BNCI2014001, doc)
|
|
186
185
|
except ModuleNotFoundError:
|
|
187
186
|
pass # keep moabb soft dependency, otherwise crash on loading of datasets.__init__.py
|
|
188
187
|
|
|
189
188
|
def __init__(self, subject_ids):
|
|
190
|
-
super().__init__("
|
|
189
|
+
super().__init__("BNCI2014001", subject_ids=subject_ids)
|
|
191
190
|
|
|
192
191
|
|
|
193
192
|
class HGD(MOABBDataset):
|
|
@@ -208,12 +207,3 @@ class HGD(MOABBDataset):
|
|
|
208
207
|
|
|
209
208
|
def __init__(self, subject_ids):
|
|
210
209
|
super().__init__("Schirrmeister2017", subject_ids=subject_ids)
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
@deprecated(
|
|
214
|
-
"`BNCI2014001` was renamed to `BNCI2014_001` in v1.13; this alias will be removed in v1.14."
|
|
215
|
-
)
|
|
216
|
-
class BNCI2014001(BNCI2014_001):
|
|
217
|
-
"""Deprecated alias for BNCI2014001."""
|
|
218
|
-
|
|
219
|
-
pass
|