Braindecode 1.3.2.dev173801889__tar.gz → 1.3.2.dev174123093__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.2.dev173801889/braindecode.egg-info → braindecode-1.3.2.dev174123093}/PKG-INFO +1 -1
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datasets/bids/hub.py +2 -7
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/__init__.py +0 -2
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/base.py +17 -28
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/eegsym.py +1 -1
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/sstdpn.py +1 -1
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/summary.csv +0 -1
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/util.py +11 -13
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/modules/attention.py +1 -2
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/preprocessing/mne_preprocess.py +1 -2
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/preprocessing/preprocess.py +31 -61
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/util.py +4 -34
- braindecode-1.3.2.dev174123093/braindecode/version.py +1 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093/braindecode.egg-info}/PKG-INFO +1 -1
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode.egg-info/SOURCES.txt +0 -1
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/docs/api.rst +9 -11
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/docs/conf.py +6 -18
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/docs/models/categorization/gnn.rst +1 -9
- braindecode-1.3.2.dev174123093/docs/models/categorization/spd.rst +35 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/docs/models/models_categorization.rst +60 -59
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/docs/whats_new.rst +4 -30
- braindecode-1.3.2.dev173801889/braindecode/models/dgcnn.py +0 -500
- braindecode-1.3.2.dev173801889/braindecode/version.py +0 -1
- braindecode-1.3.2.dev173801889/docs/models/categorization/spd.rst +0 -103
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/LICENSE.txt +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/MANIFEST.in +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/NOTICE.txt +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/README.rst +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/__init__.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/augmentation/__init__.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/augmentation/base.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/augmentation/functional.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/augmentation/transforms.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/classifier.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datasets/__init__.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datasets/base.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datasets/bbci.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datasets/bcicomp.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datasets/bids/__init__.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datasets/bids/datasets.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datasets/bids/format.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datasets/bids/hub_format.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datasets/bids/hub_io.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datasets/bids/hub_validation.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datasets/bids/iterable.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datasets/chb_mit.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datasets/mne.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datasets/moabb.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datasets/nmt.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datasets/registry.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datasets/siena.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datasets/sleep_physio_challe_18.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datasets/sleep_physionet.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datasets/tuh.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datasets/utils.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datasets/xy.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datautil/__init__.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datautil/channel_utils.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datautil/hub_formats.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datautil/serialization.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datautil/util.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/eegneuralnet.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/functional/__init__.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/functional/functions.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/functional/initialization.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/atcnet.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/attentionbasenet.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/attn_sleep.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/bendr.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/biot.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/brainmodule.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/cbramod.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/config.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/contrawr.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/ctnet.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/deep4.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/deepsleepnet.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/eegconformer.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/eeginception_erp.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/eeginception_mi.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/eegitnet.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/eegminer.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/eegnet.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/eegnex.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/eegpt.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/eegsimpleconv.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/eegtcnet.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/fbcnet.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/fblightconvnet.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/fbmsnet.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/hybrid.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/ifnet.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/labram.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/luna.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/medformer.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/msvtnet.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/patchedtransformer.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/reve.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/sccnet.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/shallow_fbcsp.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/signal_jepa.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/sinc_shallow.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/sleep_stager_blanco_2020.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/sleep_stager_chambon_2018.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/sparcnet.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/syncnet.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/tcn.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/tidnet.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/tsinception.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/usleep.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/modules/__init__.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/modules/activation.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/modules/blocks.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/modules/convolution.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/modules/filter.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/modules/layers.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/modules/linear.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/modules/parametrization.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/modules/stats.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/modules/util.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/modules/wrapper.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/preprocessing/__init__.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/preprocessing/eegprep_preprocess.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/preprocessing/util.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/preprocessing/windowers.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/regressor.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/samplers/__init__.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/samplers/base.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/samplers/ssl.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/training/__init__.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/training/callbacks.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/training/losses.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/training/scoring.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/visualization/__init__.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/visualization/confusion_matrices.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/visualization/gradients.py +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode.egg-info/dependency_links.txt +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode.egg-info/requires.txt +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode.egg-info/top_level.txt +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/docs/Makefile +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/docs/_templates/autosummary/class.rst +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/docs/_templates/autosummary/class_in_subdir.rst +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/docs/_templates/autosummary/function.rst +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/docs/_templates/autosummary/function_in_subdir.rst +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/docs/cite.rst +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/docs/help.rst +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/docs/index.rst +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/docs/install/install.rst +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/docs/install/install_pip.rst +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/docs/install/install_source.rst +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/docs/models/categorization/attention.rst +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/docs/models/categorization/channel.rst +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/docs/models/categorization/convolution.rst +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/docs/models/categorization/filterbank.rst +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/docs/models/categorization/interpretable.rst +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/docs/models/categorization/lbm.rst +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/docs/models/categorization/recurrent.rst +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/docs/models/models.rst +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/docs/models/models_table.rst +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/docs/models/models_visualization.rst +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/docs/sg_execution_times.rst +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/pyproject.toml +0 -0
- {braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/setup.cfg +0 -0
{braindecode-1.3.2.dev173801889/braindecode.egg-info → braindecode-1.3.2.dev174123093}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: braindecode
|
|
3
|
-
Version: 1.3.2.
|
|
3
|
+
Version: 1.3.2.dev174123093
|
|
4
4
|
Summary: Deep learning software to decode EEG, ECG or MEG signals
|
|
5
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>
|
{braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/datasets/bids/hub.py
RENAMED
|
@@ -845,16 +845,11 @@ class HubDatasetMixin:
|
|
|
845
845
|
|
|
846
846
|
# Convert to MNE objects and create dataset
|
|
847
847
|
info = Info.from_json_dict(info_dict)
|
|
848
|
-
targets = metadata["target"].values
|
|
849
|
-
if np.issubdtype(targets.dtype, np.integer):
|
|
850
|
-
event_ids = targets
|
|
851
|
-
else:
|
|
852
|
-
event_ids = np.ones(len(metadata), dtype=int)
|
|
853
848
|
events = np.column_stack(
|
|
854
849
|
[
|
|
855
|
-
metadata["i_start_in_trial"].values
|
|
850
|
+
metadata["i_start_in_trial"].values,
|
|
856
851
|
np.zeros(len(metadata), dtype=int),
|
|
857
|
-
|
|
852
|
+
metadata["target"].values,
|
|
858
853
|
]
|
|
859
854
|
)
|
|
860
855
|
epochs = mne.EpochsArray(data, info, events=events, metadata=metadata)
|
{braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/__init__.py
RENAMED
|
@@ -12,7 +12,6 @@ from .contrawr import ContraWR
|
|
|
12
12
|
from .ctnet import CTNet
|
|
13
13
|
from .deep4 import Deep4Net
|
|
14
14
|
from .deepsleepnet import DeepSleepNet
|
|
15
|
-
from .dgcnn import DGCNN
|
|
16
15
|
from .eegconformer import EEGConformer
|
|
17
16
|
from .eeginception_erp import EEGInceptionERP
|
|
18
17
|
from .eeginception_mi import EEGInceptionMI
|
|
@@ -88,7 +87,6 @@ __all__ = [
|
|
|
88
87
|
"EEGSym",
|
|
89
88
|
"EEGSimpleConv",
|
|
90
89
|
"EEGTCNet",
|
|
91
|
-
"DGCNN",
|
|
92
90
|
"FBCNet",
|
|
93
91
|
"FBLightConvNet",
|
|
94
92
|
"FBMSNet",
|
{braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/base.py
RENAMED
|
@@ -86,44 +86,38 @@ class EEGModuleMixin(_BaseHubMixin, metaclass=NumpyDocstringInheritanceInitMeta)
|
|
|
86
86
|
-----
|
|
87
87
|
If some input signal-related parameters are not specified,
|
|
88
88
|
there will be an attempt to infer them from the other parameters.
|
|
89
|
-
"""
|
|
90
89
|
|
|
91
|
-
#: Template for model-specific Hub integration notes appended by
|
|
92
|
-
#: ``__init_subclass__``. ``{name}`` is replaced with the concrete
|
|
93
|
-
#: model class name.
|
|
94
|
-
_HUB_NOTES_TEMPLATE = """
|
|
95
90
|
.. rubric:: Hugging Face Hub integration
|
|
96
91
|
|
|
97
92
|
When the optional ``huggingface_hub`` package is installed, all models
|
|
98
93
|
automatically gain the ability to be pushed to and loaded from the
|
|
99
94
|
Hugging Face Hub. Install with::
|
|
100
95
|
|
|
101
|
-
pip install braindecode[
|
|
96
|
+
pip install braindecode[hug]
|
|
102
97
|
|
|
103
98
|
**Pushing a model to the Hub:**
|
|
104
99
|
|
|
105
|
-
.. code-block::
|
|
100
|
+
.. code-block:: python
|
|
106
101
|
|
|
107
|
-
from braindecode.models import
|
|
102
|
+
from braindecode.models import EEGNetv4
|
|
108
103
|
|
|
109
104
|
# Train your model
|
|
110
|
-
model =
|
|
105
|
+
model = EEGNetv4(n_chans=22, n_outputs=4, n_times=1000)
|
|
111
106
|
# ... training code ...
|
|
112
107
|
|
|
113
108
|
# Push to the Hub
|
|
114
109
|
model.push_to_hub(
|
|
115
|
-
repo_id="username/my-
|
|
116
|
-
commit_message="Initial model upload",
|
|
110
|
+
repo_id="username/my-eegnet-model", commit_message="Initial model upload"
|
|
117
111
|
)
|
|
118
112
|
|
|
119
113
|
**Loading a model from the Hub:**
|
|
120
114
|
|
|
121
|
-
.. code-block::
|
|
115
|
+
.. code-block:: python
|
|
122
116
|
|
|
123
|
-
from braindecode.models import
|
|
117
|
+
from braindecode.models import EEGNetv4
|
|
124
118
|
|
|
125
119
|
# Load pretrained model
|
|
126
|
-
model =
|
|
120
|
+
model = EEGNetv4.from_pretrained("username/my-eegnet-model")
|
|
127
121
|
|
|
128
122
|
The integration automatically handles EEG-specific parameters (n_chans,
|
|
129
123
|
n_times, sfreq, chs_info, etc.) by saving them in a config file alongside
|
|
@@ -132,24 +126,19 @@ class EEGModuleMixin(_BaseHubMixin, metaclass=NumpyDocstringInheritanceInitMeta)
|
|
|
132
126
|
|
|
133
127
|
.. important::
|
|
134
128
|
Currently, only EEG-specific parameters (n_outputs, n_chans, n_times,
|
|
135
|
-
input_window_seconds, sfreq, chs_info) are saved to the Hub.
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
129
|
+
input_window_seconds, sfreq, chs_info) are saved to the Hub. Model-specific
|
|
130
|
+
parameters (e.g., dropout rates, activation functions, number of filters)
|
|
131
|
+
are not preserved and will use their default values when loading from the Hub.
|
|
132
|
+
|
|
133
|
+
To use non-default model parameters, specify them explicitly when calling
|
|
134
|
+
:func:`from_pretrained()`::
|
|
135
|
+
|
|
136
|
+
model = EEGNet.from_pretrained("user/model", dropout=0.3, activation='relu')
|
|
137
|
+
|
|
139
138
|
Full parameter serialization will be addressed in a future update.
|
|
140
139
|
"""
|
|
141
140
|
|
|
142
141
|
def __init_subclass__(cls, **kwargs):
|
|
143
|
-
# Append model-specific Hub integration notes to the docstring.
|
|
144
|
-
# This runs after the metaclass, so we concatenate rather than
|
|
145
|
-
# override any existing Notes section in the subclass.
|
|
146
|
-
if cls.__doc__ is not None:
|
|
147
|
-
hub_notes = cls._HUB_NOTES_TEMPLATE.format(
|
|
148
|
-
name=cls.__name__,
|
|
149
|
-
name_lower=cls.__name__.lower(),
|
|
150
|
-
)
|
|
151
|
-
cls.__doc__ = cls.__doc__.rstrip() + "\n" + hub_notes
|
|
152
|
-
|
|
153
142
|
if not HAS_HF_HUB:
|
|
154
143
|
super().__init_subclass__(**kwargs)
|
|
155
144
|
return
|
{braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/eegsym.py
RENAMED
|
@@ -112,7 +112,7 @@ class EEGSym(EEGModuleMixin, nn.Module):
|
|
|
112
112
|
corresponding to different frequency characteristics.
|
|
113
113
|
|
|
114
114
|
Notes
|
|
115
|
-
|
|
115
|
+
----------
|
|
116
116
|
* EEGSym achieved competitive accuracies across five large MI datasets [eegsym2022]_.
|
|
117
117
|
* The model maintained high accuracy using a reduced set of electrodes (8 or 16 channels)
|
|
118
118
|
[eegsym2022]_.
|
{braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/sstdpn.py
RENAMED
|
@@ -133,7 +133,7 @@ class SSTDPN(EEGModuleMixin, nn.Module):
|
|
|
133
133
|
learning data, according to [Han2025]_.
|
|
134
134
|
|
|
135
135
|
Notes
|
|
136
|
-
|
|
136
|
+
----------
|
|
137
137
|
* The implementation of the DPL loss functions (:math:`\mathcal{L}_S`, :math:`\mathcal{L}_C`, :math:`\mathcal{L}_{EF}`)
|
|
138
138
|
and the optimization of ICPs are typically handled outside the primary ``forward`` method, within the training strategy
|
|
139
139
|
(see Ref. 52 in [Han2025]_).
|
{braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/summary.csv
RENAMED
|
@@ -47,4 +47,3 @@ BENDR,General,"Classification,Embedding",250,"n_chans, n_times, n_outputs",15714
|
|
|
47
47
|
LUNA,General,"Classification,Embedding",128,"n_chans, n_times, sfreq, chs_info",7100731,"LUNA(n_chans=22, n_times=512, sfreq=128)","Convolution,Channel,Foundation Model"
|
|
48
48
|
MEDFormer,General,Classification,250,"n_chans, n_outputs, n_times",5313924,"MEDFormer(n_chans=22, n_outputs=4, n_times=1000)","Foundation Model,Convolution"
|
|
49
49
|
REVE,General,Classification,200,"n_outputs, n_times, n_chans",69481476,"REVE(n_times=1000, n_outputs=4, n_chans=19)","Foundation Model,Attention/Transformer"
|
|
50
|
-
DGCNN,Emotion Recognition,Classification,128,"n_chans, n_outputs, n_times, chs_info",1037385,"DGCNN(n_chans=62, n_outputs=4, n_times=128)","Graph Neural Network,Channel"
|
{braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/models/util.py
RENAMED
|
@@ -133,7 +133,6 @@ models_mandatory_parameters: list[
|
|
|
133
133
|
},
|
|
134
134
|
),
|
|
135
135
|
("CBraMod", ["n_outputs"], None),
|
|
136
|
-
("DGCNN", ["n_chans", "n_outputs", "n_times", "chs_info"], None),
|
|
137
136
|
]
|
|
138
137
|
|
|
139
138
|
################################################################
|
|
@@ -302,7 +301,7 @@ def extract_channel_locations_from_chs_info(
|
|
|
302
301
|
----------
|
|
303
302
|
chs_info : list of dict or None
|
|
304
303
|
Channel information, typically from ``mne.Info.chs``. Each dict should
|
|
305
|
-
contain a 'loc' key with a 12-element array (MNE format) where indices
|
|
304
|
+
contain a 'loc' key with a 12-element array (MNE format) where indices 3:6
|
|
306
305
|
represent the 3D cartesian coordinates.
|
|
307
306
|
num_channels : int or None
|
|
308
307
|
If specified, only extract the first ``num_channels`` channel locations.
|
|
@@ -316,7 +315,7 @@ def extract_channel_locations_from_chs_info(
|
|
|
316
315
|
|
|
317
316
|
Notes
|
|
318
317
|
-----
|
|
319
|
-
- This function handles both 12-element MNE location format (using indices
|
|
318
|
+
- This function handles both 12-element MNE location format (using indices 3:6)
|
|
320
319
|
and 3-element location format (using directly).
|
|
321
320
|
- Invalid or missing locations cause extraction to stop at that point.
|
|
322
321
|
- Returns None if no valid locations can be extracted.
|
|
@@ -348,9 +347,14 @@ def extract_channel_locations_from_chs_info(
|
|
|
348
347
|
try:
|
|
349
348
|
loc_array = np.asarray(loc, dtype=np.float32)
|
|
350
349
|
|
|
351
|
-
# MNE format: 12-element array with
|
|
352
|
-
if loc_array.ndim == 1 and loc_array.size >=
|
|
353
|
-
|
|
350
|
+
# MNE format: 12-element array with coordinates at indices 3:6
|
|
351
|
+
if loc_array.ndim == 1 and loc_array.size >= 6:
|
|
352
|
+
if loc_array.size == 12:
|
|
353
|
+
# Standard MNE format
|
|
354
|
+
coordinates = loc_array[3:6]
|
|
355
|
+
else:
|
|
356
|
+
# Assume first 3 elements are coordinates
|
|
357
|
+
coordinates = loc_array[:3]
|
|
354
358
|
else:
|
|
355
359
|
break
|
|
356
360
|
|
|
@@ -361,13 +365,7 @@ def extract_channel_locations_from_chs_info(
|
|
|
361
365
|
if len(locations) == 0:
|
|
362
366
|
return None
|
|
363
367
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
# Check positions are not all zero / degenerate
|
|
367
|
-
if np.allclose(result, 0):
|
|
368
|
-
return None
|
|
369
|
-
|
|
370
|
-
return result
|
|
368
|
+
return np.stack(locations, axis=0)
|
|
371
369
|
|
|
372
370
|
|
|
373
371
|
_summary_table = get_summary_table()
|
{braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode/modules/attention.py
RENAMED
|
@@ -8,7 +8,6 @@ AttentionBaseNet class.
|
|
|
8
8
|
|
|
9
9
|
# Authors: Martin Wimpff <martin.wimpff@iss.uni-stuttgart.de>
|
|
10
10
|
# Bruno Aristimunha <b.aristimunha@gmail.com>
|
|
11
|
-
# Sarthak Tayal <sarthaktayal2@gmail.com>
|
|
12
11
|
#
|
|
13
12
|
# License: BSD (3-clause)
|
|
14
13
|
|
|
@@ -61,7 +60,7 @@ class SqueezeAndExcitation(nn.Module):
|
|
|
61
60
|
)
|
|
62
61
|
self.nonlinearity = nn.ReLU()
|
|
63
62
|
self.fc2 = nn.Conv2d(
|
|
64
|
-
in_channels=
|
|
63
|
+
in_channels=reduction_rate,
|
|
65
64
|
out_channels=in_channels,
|
|
66
65
|
kernel_size=1,
|
|
67
66
|
bias=bias,
|
|
@@ -11,7 +11,6 @@ import mne.io
|
|
|
11
11
|
import mne.preprocessing
|
|
12
12
|
|
|
13
13
|
from braindecode.preprocessing.preprocess import Preprocessor
|
|
14
|
-
from braindecode.util import _clean_docstring_sections
|
|
15
14
|
|
|
16
15
|
|
|
17
16
|
def _is_standalone_function(func):
|
|
@@ -150,7 +149,7 @@ def _generate_mne_pre_processor(function):
|
|
|
150
149
|
force_copy_false = is_standalone and has_copy_param
|
|
151
150
|
class_attrs = {
|
|
152
151
|
"__init__": _generate_init_method(function, force_copy_false),
|
|
153
|
-
"__doc__": wrapper_note +
|
|
152
|
+
"__doc__": wrapper_note + (function.__doc__ or ""),
|
|
154
153
|
"__repr__": _generate_repr_method(class_name),
|
|
155
154
|
"fn": function if is_standalone else function.__name__,
|
|
156
155
|
"_is_standalone": is_standalone,
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
# Simon Brandt <simonbrandt@protonmail.com>
|
|
6
6
|
# David Sabbagh <dav.sabbagh@gmail.com>
|
|
7
7
|
# Bruno Aristimunha <b.aristimunha@gmail.com>
|
|
8
|
-
# Léo Burgund <leo.burgund@gmail.com>
|
|
9
8
|
#
|
|
10
9
|
# License: BSD (3-clause)
|
|
11
10
|
|
|
@@ -25,11 +24,11 @@ else:
|
|
|
25
24
|
from collections.abc import Callable
|
|
26
25
|
|
|
27
26
|
import numpy as np
|
|
27
|
+
import pandas as pd
|
|
28
28
|
from joblib import Parallel, delayed
|
|
29
29
|
from mne import BaseEpochs, create_info
|
|
30
30
|
from mne.io import BaseRaw
|
|
31
31
|
from numpy.typing import NDArray
|
|
32
|
-
from scipy.signal import lfilter
|
|
33
32
|
|
|
34
33
|
from braindecode.datasets.base import (
|
|
35
34
|
BaseConcatDataset,
|
|
@@ -425,17 +424,14 @@ def exponential_moving_standardize(
|
|
|
425
424
|
):
|
|
426
425
|
r"""Perform exponential moving standardization.
|
|
427
426
|
|
|
428
|
-
Compute the
|
|
429
|
-
|
|
430
|
-
:math:`m_t = \frac{\sum_{i=0}^t (1-\alpha)^i x_{t-i}}{\sum_{i=0}^t (1-\alpha)^i}`
|
|
431
|
-
where :math:`\alpha` is ``factor_new``.
|
|
427
|
+
Compute the exponental moving mean :math:`m_t` at time `t` as
|
|
428
|
+
:math:`m_t=\mathrm{factornew} \cdot mean(x_t) + (1 - \mathrm{factornew}) \cdot m_{t-1}`.
|
|
432
429
|
|
|
433
430
|
Then, compute exponential moving variance :math:`v_t` at time `t` as
|
|
434
|
-
|
|
435
|
-
:math:`v_t = \frac{\sum_{i=0}^t (1-\alpha)^i (x_{t-i} - m_{t-i})^2}{\sum_{i=0}^t (1-\alpha)^i}`.
|
|
431
|
+
:math:`v_t=\mathrm{factornew} \cdot (m_t - x_t)^2 + (1 - \mathrm{factornew}) \cdot v_{t-1}`.
|
|
436
432
|
|
|
437
433
|
Finally, standardize the data point :math:`x_t` at time `t` as:
|
|
438
|
-
:math:`x'_t=(x_t - m_t) / max(\sqrt{v_t}, eps)`.
|
|
434
|
+
:math:`x'_t=(x_t - m_t) / max(\sqrt{->v_t}, eps)`.
|
|
439
435
|
|
|
440
436
|
|
|
441
437
|
Parameters
|
|
@@ -452,52 +448,34 @@ def exponential_moving_standardize(
|
|
|
452
448
|
standardized: np.ndarray (n_channels, n_times)
|
|
453
449
|
Standardized data.
|
|
454
450
|
"""
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
# y_t = N_t / D_t
|
|
460
|
-
# N_t = x_t + (1-alpha) * N_{t-1}, N_0 = x_0
|
|
461
|
-
# D_t = 1 + (1-alpha) * D_{t-1}, D_0 = 1
|
|
462
|
-
alpha = factor_new
|
|
463
|
-
_, n_times = data.shape
|
|
464
|
-
inv_alpha = 1.0 - alpha
|
|
465
|
-
|
|
466
|
-
# Filter a sequence of ones: [1, 1+(1-a), 1+(1-a)+(1-a)^2, ...]
|
|
467
|
-
d = lfilter([1.0], [1.0, -inv_alpha], np.ones(n_times))
|
|
468
|
-
|
|
469
|
-
n = lfilter([1.0], [1.0, -inv_alpha], data, axis=1)
|
|
470
|
-
meaned = n / d
|
|
471
|
-
demeaned = data - meaned
|
|
472
|
-
|
|
451
|
+
data = data.T
|
|
452
|
+
df = pd.DataFrame(data)
|
|
453
|
+
meaned = df.ewm(alpha=factor_new).mean()
|
|
454
|
+
demeaned = df - meaned
|
|
473
455
|
squared = demeaned * demeaned
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
standardized = demeaned / np.maximum(eps, np.sqrt(square_ewmed))
|
|
478
|
-
|
|
456
|
+
square_ewmed = squared.ewm(alpha=factor_new).mean()
|
|
457
|
+
standardized = demeaned / np.maximum(eps, np.sqrt(np.array(square_ewmed)))
|
|
458
|
+
standardized = np.array(standardized)
|
|
479
459
|
if init_block_size is not None:
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
460
|
+
i_time_axis = 0
|
|
461
|
+
init_mean = np.mean(data[0:init_block_size], axis=i_time_axis, keepdims=True)
|
|
462
|
+
init_std = np.std(data[0:init_block_size], axis=i_time_axis, keepdims=True)
|
|
463
|
+
init_block_standardized = (data[0:init_block_size] - init_mean) / np.maximum(
|
|
483
464
|
eps, init_std
|
|
484
465
|
)
|
|
485
|
-
standardized[
|
|
486
|
-
|
|
487
|
-
return standardized
|
|
466
|
+
standardized[0:init_block_size] = init_block_standardized
|
|
467
|
+
return standardized.T
|
|
488
468
|
|
|
489
469
|
|
|
490
470
|
def exponential_moving_demean(
|
|
491
471
|
data: NDArray, factor_new: float = 0.001, init_block_size: int | None = None
|
|
492
472
|
):
|
|
493
|
-
r"""Perform exponential moving
|
|
473
|
+
r"""Perform exponential moving demeanining.
|
|
494
474
|
|
|
495
|
-
Compute the
|
|
496
|
-
|
|
497
|
-
:math:`m_t = \frac{\sum_{i=0}^t (1-\alpha)^i x_{t-i}}{\sum_{i=0}^t (1-\alpha)^i}`
|
|
498
|
-
where :math:`\alpha` is ``factor_new``.
|
|
475
|
+
Compute the exponental moving mean :math:`m_t` at time `t` as
|
|
476
|
+
:math:`m_t=\mathrm{factornew} \cdot mean(x_t) + (1 - \mathrm{factornew}) \cdot m_{t-1}`.
|
|
499
477
|
|
|
500
|
-
|
|
478
|
+
Deman the data point :math:`x_t` at time `t` as:
|
|
501
479
|
:math:`x'_t=(x_t - m_t)`.
|
|
502
480
|
|
|
503
481
|
Parameters
|
|
@@ -512,24 +490,16 @@ def exponential_moving_demean(
|
|
|
512
490
|
demeaned: np.ndarray (n_channels, n_times)
|
|
513
491
|
Demeaned data.
|
|
514
492
|
"""
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
inv_alpha = 1.0 - alpha
|
|
521
|
-
|
|
522
|
-
d = lfilter([1.0], [1.0, -inv_alpha], np.ones(n_times))
|
|
523
|
-
|
|
524
|
-
n = lfilter([1.0], [1.0, -inv_alpha], data, axis=1)
|
|
525
|
-
meaned = n / d
|
|
526
|
-
demeaned = data - meaned
|
|
527
|
-
|
|
493
|
+
data = data.T
|
|
494
|
+
df = pd.DataFrame(data)
|
|
495
|
+
meaned = df.ewm(alpha=factor_new).mean()
|
|
496
|
+
demeaned = df - meaned
|
|
497
|
+
demeaned = np.array(demeaned)
|
|
528
498
|
if init_block_size is not None:
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
return demeaned
|
|
499
|
+
i_time_axis = 0
|
|
500
|
+
init_mean = np.mean(data[0:init_block_size], axis=i_time_axis, keepdims=True)
|
|
501
|
+
demeaned[0:init_block_size] = data[0:init_block_size] - init_mean
|
|
502
|
+
return demeaned.T
|
|
533
503
|
|
|
534
504
|
|
|
535
505
|
def filterbank(
|
|
@@ -384,42 +384,12 @@ def update_estimator_docstring(base_class, docstring):
|
|
|
384
384
|
return out_docstring
|
|
385
385
|
|
|
386
386
|
|
|
387
|
-
def _clean_docstring_sections(doc, remove_sections=("References",)):
|
|
388
|
-
"""Remove numpydoc-style sections that cause Sphinx build errors.
|
|
389
|
-
|
|
390
|
-
Numpydoc renders section headers as ``.. rubric::`` directives.
|
|
391
|
-
When the section body contains indented RST directives (e.g.
|
|
392
|
-
``.. footbibliography::`` or ``.. [citation]``), Sphinx errors
|
|
393
|
-
because rubric does not accept body content. Stripping these
|
|
394
|
-
sections from the *raw* docstring prevents numpydoc from
|
|
395
|
-
generating the problematic output.
|
|
396
|
-
"""
|
|
397
|
-
if not doc:
|
|
398
|
-
return doc or ""
|
|
399
|
-
|
|
400
|
-
for section in remove_sections:
|
|
401
|
-
# Match the section header + underline + body lines that follow.
|
|
402
|
-
# The body stops at the next numpydoc section (an optionally-indented
|
|
403
|
-
# word line followed by a dashes-only underline) or at end-of-string.
|
|
404
|
-
doc = re.sub(
|
|
405
|
-
rf"(\n[ \t]*){re.escape(section)}\n[ \t]*-+\n"
|
|
406
|
-
r"(?:(?![ \t]*\w[^\n]*\n[ \t]*-+)(?:[ \t]+[^\n]*\n|[ \t]*\n))*",
|
|
407
|
-
r"\1",
|
|
408
|
-
doc,
|
|
409
|
-
)
|
|
410
|
-
return doc
|
|
411
|
-
|
|
412
|
-
|
|
413
387
|
def _update_moabb_docstring(base_class, docstring):
|
|
414
388
|
base_doc = base_class.__doc__
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
)
|
|
420
|
-
# Strip dangling citation references (e.g. ``[1]_``) whose definitions
|
|
421
|
-
# were in the removed References section.
|
|
422
|
-
base_doc = re.sub(r"\s*\[\d+\]_", "", base_doc)
|
|
389
|
+
# Clean up malformed rubrics from moabb docstrings
|
|
390
|
+
# Remove lines that have ".. rubric::" followed by content on same line or improper formatting
|
|
391
|
+
|
|
392
|
+
base_doc = re.sub(r"\.\. rubric:: (.+?)\n\s+\.\. note::", r".. note::", base_doc)
|
|
423
393
|
out_docstring = base_doc + f"\n\n{docstring}"
|
|
424
394
|
return out_docstring
|
|
425
395
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.3.2.dev174123093"
|
{braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093/braindecode.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: braindecode
|
|
3
|
-
Version: 1.3.2.
|
|
3
|
+
Version: 1.3.2.dev174123093
|
|
4
4
|
Summary: Deep learning software to decode EEG, ECG or MEG signals
|
|
5
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>
|
{braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/braindecode.egg-info/SOURCES.txt
RENAMED
|
@@ -64,7 +64,6 @@ braindecode/models/contrawr.py
|
|
|
64
64
|
braindecode/models/ctnet.py
|
|
65
65
|
braindecode/models/deep4.py
|
|
66
66
|
braindecode/models/deepsleepnet.py
|
|
67
|
-
braindecode/models/dgcnn.py
|
|
68
67
|
braindecode/models/eegconformer.py
|
|
69
68
|
braindecode/models/eeginception_erp.py
|
|
70
69
|
braindecode/models/eeginception_mi.py
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
********
|
|
16
16
|
|
|
17
17
|
Model zoo availables in braindecode. The models are implemented as ``PyTorch``
|
|
18
|
-
:py:class:`torch.nn.
|
|
18
|
+
:py:class:`torch.nn.Modules` and can be used for various EEG decoding ways tasks.
|
|
19
19
|
|
|
20
20
|
All the models have the convention of having the signal related parameters named the
|
|
21
21
|
same way, following the braindecode's standards:
|
|
@@ -27,24 +27,23 @@ same way, following the braindecode's standards:
|
|
|
27
27
|
- (:fa:`clock`/ :fa:`wifi`\) ``input_window_seconds``: Length of the input window in
|
|
28
28
|
seconds.
|
|
29
29
|
- :fa:`info-circle` ``chs_info``: Information about each individual EEG channel. Refer
|
|
30
|
-
to :class:`mne.Info
|
|
30
|
+
to :class:`mne.Info["chs"]`.
|
|
31
31
|
|
|
32
32
|
All the models assume that the input data is a 3D tensor of shape ``(batch_size,
|
|
33
33
|
n_chans, n_times)``, and some models also accept a 4D tensor of shape ``(batch_size,
|
|
34
34
|
n_chans, n_times, n_epochs)``, in case of cropped model.
|
|
35
35
|
|
|
36
|
-
All the models are implemented as subclasses of
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
interface for all EEG models and can derive variable names when needed.
|
|
36
|
+
All the models are implemented as subclasses of :py:class:`EEGModuleMixin`, which is a
|
|
37
|
+
base class for all EEG models in Braindecode. The :class:`EEGModuleMixin` class provides
|
|
38
|
+
a common interface for all EEG models and derivate variables names if necessary.
|
|
40
39
|
|
|
41
40
|
.. important::
|
|
42
41
|
|
|
43
42
|
**Hugging Face Hub Integration**
|
|
44
43
|
|
|
45
44
|
All models in braindecode naturally possess the capability to push and pull from the
|
|
46
|
-
Hugging Face Hub through inheritance from
|
|
47
|
-
|
|
45
|
+
Hugging Face Hub through inheritance from :class:`PyTorchModelHubMixin`. This allows
|
|
46
|
+
you to:
|
|
48
47
|
|
|
49
48
|
- **Load pre-trained models** from the Hub using
|
|
50
49
|
``Model.from_pretrained("repo_id")``
|
|
@@ -101,8 +100,8 @@ interface for all EEG models and can derive variable names when needed.
|
|
|
101
100
|
repo_id="username/my-eegnex-model", commit_message="Initial model upload"
|
|
102
101
|
)
|
|
103
102
|
|
|
104
|
-
For more details, see the :class
|
|
105
|
-
|
|
103
|
+
For more details, see the :class:`EEGModuleMixin` documentation and the
|
|
104
|
+
:ref:`hub-integration` tutorial.
|
|
106
105
|
|
|
107
106
|
:note: Auto-generated Pydantic configs are available when the optional
|
|
108
107
|
``braindecode[pydantic]`` extra (which installs ``pydantic`` and ``numpydantic``) is
|
|
@@ -136,7 +135,6 @@ interface for all EEG models and can derive variable names when needed.
|
|
|
136
135
|
CBraMod
|
|
137
136
|
ContraWR
|
|
138
137
|
CTNet
|
|
139
|
-
DGCNN
|
|
140
138
|
Deep4Net
|
|
141
139
|
DeepSleepNet
|
|
142
140
|
EEGConformer
|
|
@@ -25,11 +25,6 @@ import os.path as op
|
|
|
25
25
|
import sys
|
|
26
26
|
import warnings
|
|
27
27
|
|
|
28
|
-
# Enable docstring inheritance before any braindecode imports so that
|
|
29
|
-
# NumpyDocstringInheritanceInitMeta merges parent parameters into child
|
|
30
|
-
# class docstrings (e.g. EEGModuleMixin params into every model).
|
|
31
|
-
os.environ["DOCSTRING_INHERITANCE_ENABLE"] = "1"
|
|
32
|
-
|
|
33
28
|
import matplotlib
|
|
34
29
|
|
|
35
30
|
matplotlib.use("agg")
|
|
@@ -72,8 +67,7 @@ except Exception as e:
|
|
|
72
67
|
needs_sphinx = "2.0"
|
|
73
68
|
|
|
74
69
|
curdir = os.path.dirname(__file__)
|
|
75
|
-
|
|
76
|
-
sys.path.insert(0, os.path.abspath(os.path.join(curdir, "..")))
|
|
70
|
+
sys.path.append(os.path.abspath(os.path.join(curdir, "..", "braindecode")))
|
|
77
71
|
sys.path.append(os.path.abspath(os.path.join(curdir, "sphinxext")))
|
|
78
72
|
|
|
79
73
|
import sphinx_design
|
|
@@ -265,19 +259,13 @@ todo_include_todos = True
|
|
|
265
259
|
# Example configuration for intersphinx: refer to the Python standard library.
|
|
266
260
|
intersphinx_mapping = {
|
|
267
261
|
"python": ("https://docs.python.org/{.major}".format(sys.version_info), None),
|
|
268
|
-
"numpy": ("https://
|
|
269
|
-
"scipy": ("https://docs.scipy.org/doc/scipy/", None),
|
|
270
|
-
"matplotlib": ("https://matplotlib.org/
|
|
271
|
-
"sklearn": ("
|
|
272
|
-
"mne": ("
|
|
262
|
+
"numpy": ("https://docs.scipy.org/doc/numpy/", None),
|
|
263
|
+
"scipy": ("https://docs.scipy.org/doc/scipy/reference", None),
|
|
264
|
+
"matplotlib": ("https://matplotlib.org/", None),
|
|
265
|
+
"sklearn": ("http://scikit-learn.org/stable", None),
|
|
266
|
+
"mne": ("http://mne.tools/stable", None),
|
|
273
267
|
"skorch": ("https://skorch.readthedocs.io/en/stable/", None),
|
|
274
268
|
"torch": ("https://pytorch.org/docs/stable/", None),
|
|
275
|
-
"huggingface_hub": (
|
|
276
|
-
"https://huggingface.co/docs/huggingface_hub/main/en/",
|
|
277
|
-
None,
|
|
278
|
-
),
|
|
279
|
-
"mne_bids": ("https://mne.tools/mne-bids/stable/", None),
|
|
280
|
-
"spd_learn": ("https://spdlearn.org/", None),
|
|
281
269
|
}
|
|
282
270
|
|
|
283
271
|
sphinx_gallery_conf = {
|
{braindecode-1.3.2.dev173801889 → braindecode-1.3.2.dev174123093}/docs/models/categorization/gnn.rst
RENAMED
|
@@ -15,15 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
:bdg-light:`Graph Neural Network`
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
learn inter-channel relationships dynamically.
|
|
20
|
-
|
|
21
|
-
.. rubric:: Available Models
|
|
22
|
-
|
|
23
|
-
- :class:`DGCNN` — Dynamic Graph Convolutional Neural Network. Treats electrodes as
|
|
24
|
-
graph nodes and learns the adjacency matrix jointly with all other parameters via
|
|
25
|
-
back-propagation. Uses Chebyshev spectral graph convolution to extract spatial
|
|
26
|
-
features from the learned graph Laplacian. Based on Song et al. (2018).
|
|
18
|
+
I doesn't know much about GNNs for EEG yet. No LitMap available.
|
|
27
19
|
|
|
28
20
|
.. include:: ../../links.inc
|
|
29
21
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
:html_theme.sidebar_secondary.remove: true
|
|
2
|
+
|
|
3
|
+
.. currentmodule:: braindecode.models
|
|
4
|
+
|
|
5
|
+
.. _models_spd:
|
|
6
|
+
|
|
7
|
+
########################################
|
|
8
|
+
|spd-icon| Symmetric Positive-Definite
|
|
9
|
+
########################################
|
|
10
|
+
|
|
11
|
+
.. |spd-icon| image:: ../../_static/model_cat/spd.png
|
|
12
|
+
:alt: Symmetric Positive-Definite icon
|
|
13
|
+
:height: 56px
|
|
14
|
+
:class: heading-icon no-scaled-link
|
|
15
|
+
|
|
16
|
+
:bdg-success:`Symmetric Positive-Definite (SPD)`
|
|
17
|
+
|
|
18
|
+
.. figure:: ../../_static/model_connection/litmap_spd_learn.png
|
|
19
|
+
:width: 100%
|
|
20
|
+
:align: center
|
|
21
|
+
|
|
22
|
+
Figure: `LitMap
|
|
23
|
+
<https://app.litmaps.com/shared/bcd44ea5-9d52-46ed-9948-4b34714d4f05>`__ **with
|
|
24
|
+
symmetric positive-definite layers, last updated 26/08/2025.** Each node is a paper;
|
|
25
|
+
rightward means more recently published, upward more cited, and links show amount of
|
|
26
|
+
citation with logaritm scale.
|
|
27
|
+
|
|
28
|
+
.. include:: ../../links.inc
|
|
29
|
+
|
|
30
|
+
.. raw:: html
|
|
31
|
+
|
|
32
|
+
<style>
|
|
33
|
+
/* nudge the icon so it sits nicely on the baseline */
|
|
34
|
+
img.heading-icon { vertical-align: -0.2em; margin-right: .45rem; }
|
|
35
|
+
</style>
|