braindecode 2.1.0.dev182465016__tar.gz → 2.1.0.dev182653083__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-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/MANIFEST.in +1 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/NOTICE.txt +36 -5
- {braindecode-2.1.0.dev182465016/braindecode.egg-info → braindecode-2.1.0.dev182653083}/PKG-INFO +27 -10
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/README.rst +22 -7
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/augmentation/functional.py +1 -3
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/augmentation/transforms.py +1 -1
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/classifier.py +11 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datasets/base.py +105 -53
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datasets/bids/hub.py +15 -1
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datasets/tuh.py +31 -19
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datasets/utils.py +15 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datautil/hub_formats.py +76 -15
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datautil/serialization.py +8 -1
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datautil/util.py +50 -12
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/functional/__init__.py +12 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/functional/_real_dft.py +4 -4
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/functional/attention.py +12 -54
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/functional/channel_mask.py +45 -10
- braindecode-2.1.0.dev182653083/braindecode/functional/channels.py +294 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/functional/functions.py +55 -33
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/functional/patches.py +17 -9
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/__init__.py +16 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/attn_sleep.py +40 -6
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/axon.py +9 -1
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/base.py +298 -21
- braindecode-2.1.0.dev182653083/braindecode/models/bbl.py +326 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/bendr.py +13 -3
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/biot.py +32 -20
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/brainmodule.py +1 -13
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/brainomni.py +84 -125
- braindecode-2.1.0.dev182653083/braindecode/models/caresleepnet.py +356 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/cbramod.py +28 -6
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/codebrain.py +24 -20
- braindecode-2.1.0.dev182653083/braindecode/models/corteg.py +591 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/csbrain.py +44 -10
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/duin.py +15 -1
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/eeg_clip.py +27 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/eegpt.py +10 -3
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/eegtcnet.py +31 -4
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/emg2qwerty.py +8 -2
- braindecode-2.1.0.dev182653083/braindecode/models/fnirs4d.py +761 -0
- braindecode-2.1.0.dev182653083/braindecode/models/fnirs_cnn1d.py +339 -0
- braindecode-2.1.0.dev182653083/braindecode/models/fnirs_t.py +785 -0
- braindecode-2.1.0.dev182653083/braindecode/models/fnirsnet.py +374 -0
- braindecode-2.1.0.dev182653083/braindecode/models/geonirs.py +1563 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/guetschel2026.py +1 -1
- braindecode-2.1.0.dev182653083/braindecode/models/jung_mae.py +624 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/labram.py +10 -19
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/luna.py +85 -32
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/mapa.py +32 -5
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/medformer.py +16 -1
- braindecode-2.1.0.dev182653083/braindecode/models/meggpt.py +708 -0
- braindecode-2.1.0.dev182653083/braindecode/models/megxl.py +459 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/meta_neuromotor.py +3 -1
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/mirepnet.py +8 -0
- braindecode-2.1.0.dev182653083/braindecode/models/model.html.jinja +163 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/msvtnet.py +1 -2
- braindecode-2.1.0.dev182653083/braindecode/models/mtrenirs.py +1071 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/neurorvq.py +25 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/neurorvq_tokenizer.py +16 -0
- braindecode-2.1.0.dev182653083/braindecode/models/nice.py +242 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/patchedtransformer.py +44 -16
- braindecode-2.1.0.dev182653083/braindecode/models/pratibha2.py +518 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/reve.py +26 -7
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/signal_jepa.py +34 -6
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/sleepfm.py +126 -25
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/steegformer.py +10 -1
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/summary.csv +17 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/syncnet.py +20 -8
- braindecode-2.1.0.dev182653083/braindecode/models/tccnet.py +327 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/tfm_tokenizer.py +11 -0
- braindecode-2.1.0.dev182653083/braindecode/models/tinymyo.py +367 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/util.py +221 -2
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/vemg2pose.py +2 -1
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/zuna.py +22 -27
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/modules/__init__.py +14 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/modules/attention.py +54 -10
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/modules/blocks.py +15 -35
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/modules/channels.py +243 -57
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/modules/filter.py +54 -24
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/modules/layers.py +9 -9
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/modules/linear.py +2 -4
- braindecode-2.1.0.dev182653083/braindecode/modules/seanet.py +239 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/preprocessing/mne_preprocess.py +5 -1
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/preprocessing/preprocess.py +4 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/preprocessing/windowers.py +14 -6
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/samplers/ssl.py +8 -10
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/training/losses.py +83 -18
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/util.py +29 -36
- braindecode-2.1.0.dev182653083/braindecode/version.py +1 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/visualization/attribution.py +25 -6
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/visualization/frequency.py +22 -3
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/visualization/metrics.py +2 -7
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/visualization/sanity.py +8 -6
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083/braindecode.egg-info}/PKG-INFO +27 -10
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode.egg-info/SOURCES.txt +20 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode.egg-info/requires.txt +4 -2
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/api.rst +63 -6
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/cite.rst +25 -7
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/conf.py +3 -1
- braindecode-2.1.0.dev182653083/docs/install/gaudi.rst +114 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/install/install.rst +3 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/install/install_pip.rst +3 -3
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/install/install_source.rst +3 -3
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/models/models_table.rst +2 -2
- braindecode-2.1.0.dev182653083/docs/user_guide/channel_strategies.rst +110 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/whats_new.rst +585 -13
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/pyproject.toml +4 -3
- braindecode-2.1.0.dev182465016/braindecode/version.py +0 -1
- braindecode-2.1.0.dev182465016/docs/user_guide/channel_strategies.rst +0 -59
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/LICENSE.txt +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/__init__.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/augmentation/__init__.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/augmentation/base.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datasets/__init__.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datasets/_notebook_viewer.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datasets/bbci.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datasets/bcicomp.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datasets/bids/__init__.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datasets/bids/datasets.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datasets/bids/hub_format.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datasets/bids/hub_io.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datasets/bids/hub_validation.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datasets/bids/iterable.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datasets/chb_mit.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datasets/collate.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datasets/mne.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datasets/moabb.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datasets/nmt.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datasets/registry.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datasets/siena.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datasets/sleep_physio_challe_18.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datasets/sleep_physionet.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datasets/xy.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datautil/__init__.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datautil/channel_utils.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/eegneuralnet.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/functional/_lfilter.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/functional/initialization.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/atcnet.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/attentionbasenet.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/barista.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/brainbert.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/brant.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/config.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/contrawr.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/ctnet.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/dance.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/deep4.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/deepsleepnet.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/dgcnn.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/diver1.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/eegconformer.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/eegdino.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/eeginception_erp.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/eeginception_mi.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/eegitnet.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/eegminer.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/eegnet.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/eegnex.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/eegsimpleconv.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/eegsym.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/epint.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/fbcnet.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/fblightconvnet.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/fbmsnet.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/gcnsnet.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/hybrid.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/ifnet.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/mscformer.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/mvpformer.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/neuropose.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/popt.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/sccnet.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/seizure_transformer.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/sensingdynamics.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/shallow_fbcsp.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/sinc_shallow.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/sleep_stager_blanco_2020.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/sleep_stager_chambon_2018.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/sparcnet.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/sstdpn.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/tcformer.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/tcn.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/tidnet.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/tmsanet.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/tsinception.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/models/usleep.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/modules/activation.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/modules/convolution.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/modules/dance_modules.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/modules/linear_attention.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/modules/parametrization.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/modules/quantization.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/modules/stats.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/modules/util.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/modules/wrapper.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/preprocessing/__init__.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/preprocessing/eegprep_preprocess.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/preprocessing/util.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/regressor.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/samplers/__init__.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/samplers/base.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/training/__init__.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/training/_trial_aggregation.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/training/callbacks.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/training/scoring.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/visualization/__init__.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/visualization/activations.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/visualization/confusion_matrices.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/visualization/topology.py +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode.egg-info/dependency_links.txt +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode.egg-info/top_level.txt +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/Makefile +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/_templates/autosummary/class.rst +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/_templates/autosummary/class_in_subdir.rst +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/_templates/autosummary/function.rst +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/_templates/autosummary/function_in_subdir.rst +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/agent_docs.rst +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/help.rst +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/index.rst +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/models/categorization/attention.rst +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/models/categorization/channel.rst +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/models/categorization/convolution.rst +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/models/categorization/filterbank.rst +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/models/categorization/gnn.rst +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/models/categorization/interpretable.rst +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/models/categorization/lbm.rst +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/models/categorization/recurrent.rst +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/models/categorization/spd.rst +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/models/models.rst +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/models/models_categorization.rst +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/models/models_visualization.rst +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/sg_execution_times.rst +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/docs/user_guide/cropped_inference.rst +0 -0
- {braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/setup.cfg +0 -0
|
@@ -38,6 +38,7 @@ same noncommercial ShareAlike terms.
|
|
|
38
38
|
|
|
39
39
|
The following components are licensed under the MIT License:
|
|
40
40
|
|
|
41
|
+
- `braindecode/models/caresleepnet.py`
|
|
41
42
|
- `braindecode/models/ctnet.py`
|
|
42
43
|
- `braindecode/models/dance.py`
|
|
43
44
|
- `braindecode/models/duin.py`
|
|
@@ -48,7 +49,9 @@ The following components are licensed under the MIT License:
|
|
|
48
49
|
- `braindecode/models/popt.py`
|
|
49
50
|
- `braindecode/models/tfm_tokenizer.py`
|
|
50
51
|
- `braindecode/models/brainomni.py`
|
|
52
|
+
- `braindecode/models/bbl.py`
|
|
51
53
|
- `braindecode/modules/quantization.py`
|
|
54
|
+
- `braindecode/modules/seanet.py`
|
|
52
55
|
- `braindecode/modules/linear_attention.py`
|
|
53
56
|
- `braindecode/models/seizure_transformer.py`
|
|
54
57
|
- `docs/_static/model/seizure_transformer_arch.png`
|
|
@@ -56,26 +59,53 @@ The following components are licensed under the MIT License:
|
|
|
56
59
|
- `braindecode/models/tmsanet.py`
|
|
57
60
|
- `braindecode/models/epint.py`
|
|
58
61
|
- `braindecode/models/gcnsnet.py`
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
`
|
|
63
|
-
`
|
|
62
|
+
- `braindecode/models/corteg.py`
|
|
63
|
+
- `braindecode/models/meggpt.py`
|
|
64
|
+
- `braindecode/models/megxl.py`
|
|
65
|
+
- `braindecode/models/nice.py`
|
|
66
|
+
- `braindecode/models/fnirs_t.py`
|
|
67
|
+
- `docs/_static/model/fnirst.png` (wzhlearning/fNIRS-Transformer `fig/model.png`)
|
|
68
|
+
- `braindecode/models/mtrenirs.py`
|
|
69
|
+
- `braindecode/models/tccnet.py`
|
|
70
|
+
- `docs/_static/model/tccnet.png`
|
|
71
|
+
|
|
72
|
+
The `brainomni.py` file is a derivative of `OpenTSLab/BrainOmni` (MIT). The
|
|
73
|
+
`seanet.py` module holds its SEANet codec, derived from Meta's
|
|
74
|
+
`facebookresearch/encodec` (MIT). The `quantization.py` module holds the
|
|
75
|
+
residual vector quantization derived from `lucidrains/vector-quantize-pytorch`
|
|
76
|
+
(MIT) and the BrainOmni port.
|
|
64
77
|
The `linear_attention.py` module is the part of
|
|
65
78
|
`lucidrains/linear-attention-transformer` (MIT) that BIOT and TFMTokenizer run.
|
|
79
|
+
The `tccnet.py` file is a derivative of `DSIP-UPatras/ICASSP2019_TCN` (MIT),
|
|
80
|
+
whose average-over-time and context-attention layers come from
|
|
81
|
+
`cbaziotis/keras-utilities` (MIT).
|
|
66
82
|
|
|
67
83
|
### Apache-2.0 Licensed Files
|
|
68
84
|
|
|
69
85
|
The following components are licensed under the Apache License 2.0:
|
|
70
86
|
|
|
71
87
|
- `braindecode/models/axon.py`
|
|
88
|
+
- `braindecode/models/pratibha2.py`
|
|
72
89
|
- `braindecode/models/mvpformer.py`
|
|
73
90
|
- `braindecode/models/zuna.py`
|
|
74
91
|
- `braindecode/models/luna.py`
|
|
92
|
+
- `braindecode/models/tinymyo.py`
|
|
75
93
|
- `braindecode/models/mapa.py`
|
|
76
94
|
- `braindecode/models/brant.py`
|
|
77
95
|
- `braindecode/models/diver1.py`
|
|
78
96
|
- `braindecode/models/mscformer.py`
|
|
97
|
+
- `braindecode/models/fnirsnet.py`
|
|
98
|
+
- `braindecode/models/fnirs4d.py`
|
|
99
|
+
- `docs/_static/model/fnirs4d.png` (wzhlearning/fNIRS4D `fig/fig2.png`, resized)
|
|
100
|
+
|
|
101
|
+
### CC BY 4.0 Licensed Files
|
|
102
|
+
|
|
103
|
+
The following figures are reproduced from open-access papers under the
|
|
104
|
+
Creative Commons Attribution 4.0 International License (each docstring
|
|
105
|
+
cites the paper):
|
|
106
|
+
|
|
107
|
+
- `docs/_static/model/fnirsnet.png` (Wang et al., IEEE TNSRE 2023, Fig. 2, cropped)
|
|
108
|
+
- `docs/_static/model/mtrenirs.png` (Chae et al., arXiv:2610.36159, Fig. 2, cropped)
|
|
79
109
|
|
|
80
110
|
### USC Academic License Files
|
|
81
111
|
|
|
@@ -91,6 +121,7 @@ The following components are licensed under the Apache License 2.0:
|
|
|
91
121
|
- [CC BY-NC-SA 4.0 License](https://creativecommons.org/licenses/by-nc-sa/4.0/)
|
|
92
122
|
- [MIT License](https://opensource.org/licenses/MIT)
|
|
93
123
|
- [Apache-2.0 License](https://www.apache.org/licenses/LICENSE-2.0)
|
|
124
|
+
- [CC BY 4.0 License](https://creativecommons.org/licenses/by/4.0/)
|
|
94
125
|
- [USC Academic License](https://github.com/ShanechiLab/BaRISTA/blob/master/LICENSE.md)
|
|
95
126
|
|
|
96
127
|
## Note
|
{braindecode-2.1.0.dev182465016/braindecode.egg-info → braindecode-2.1.0.dev182653083}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: braindecode
|
|
3
|
-
Version: 2.1.0.
|
|
3
|
+
Version: 2.1.0.dev182653083
|
|
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>
|
|
@@ -24,12 +24,13 @@ License-File: LICENSE.txt
|
|
|
24
24
|
License-File: NOTICE.txt
|
|
25
25
|
Requires-Dist: torch>=2.6
|
|
26
26
|
Requires-Dist: torchaudio>=2.6
|
|
27
|
-
Requires-Dist: mne>=1.
|
|
27
|
+
Requires-Dist: mne>=1.13.0
|
|
28
28
|
Requires-Dist: mne_bids>=0.19
|
|
29
29
|
Requires-Dist: h5py
|
|
30
30
|
Requires-Dist: skorch>=1.3.1
|
|
31
31
|
Requires-Dist: joblib
|
|
32
32
|
Requires-Dist: torchinfo
|
|
33
|
+
Requires-Dist: jinja2
|
|
33
34
|
Requires-Dist: pandas
|
|
34
35
|
Requires-Dist: wfdb>=4.3.1
|
|
35
36
|
Requires-Dist: docstring_inheritance
|
|
@@ -43,6 +44,7 @@ Requires-Dist: torch>=2.7; python_version < "3.12" and extra == "eegprep"
|
|
|
43
44
|
Provides-Extra: hub
|
|
44
45
|
Requires-Dist: huggingface_hub[torch]>=0.20.0; extra == "hub"
|
|
45
46
|
Requires-Dist: zarr>=3.1; extra == "hub"
|
|
47
|
+
Requires-Dist: filelock; extra == "hub"
|
|
46
48
|
Provides-Extra: viz
|
|
47
49
|
Requires-Dist: captum>=0.7.0; extra == "viz"
|
|
48
50
|
Provides-Extra: sae
|
|
@@ -56,6 +58,7 @@ Requires-Dist: codecov; extra == "tests"
|
|
|
56
58
|
Requires-Dist: pytest_cases; extra == "tests"
|
|
57
59
|
Requires-Dist: mypy; extra == "tests"
|
|
58
60
|
Requires-Dist: ipython; extra == "tests"
|
|
61
|
+
Requires-Dist: PyYAML; extra == "tests"
|
|
59
62
|
Requires-Dist: transformers>=4.57.0; extra == "tests"
|
|
60
63
|
Requires-Dist: bids_validator; extra == "tests"
|
|
61
64
|
Provides-Extra: typing
|
|
@@ -83,7 +86,6 @@ Requires-Dist: pre-commit; extra == "docs"
|
|
|
83
86
|
Requires-Dist: openneuro-py>=2026.4.0; extra == "docs"
|
|
84
87
|
Requires-Dist: plotly; extra == "docs"
|
|
85
88
|
Requires-Dist: shap; extra == "docs"
|
|
86
|
-
Requires-Dist: nbformat; extra == "docs"
|
|
87
89
|
Requires-Dist: transformers; extra == "docs"
|
|
88
90
|
Provides-Extra: all
|
|
89
91
|
Requires-Dist: braindecode[moabb]; extra == "all"
|
|
@@ -95,8 +97,8 @@ Requires-Dist: braindecode[typing]; extra == "all"
|
|
|
95
97
|
Requires-Dist: braindecode[viz]; extra == "all"
|
|
96
98
|
Dynamic: license-file
|
|
97
99
|
|
|
98
|
-
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.
|
|
99
|
-
:target: https://doi.org/10.5281/zenodo.
|
|
100
|
+
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.8214376.svg
|
|
101
|
+
:target: https://doi.org/10.5281/zenodo.8214376
|
|
100
102
|
:alt: DOI
|
|
101
103
|
|
|
102
104
|
.. image:: https://github.com/braindecode/braindecode/workflows/docs/badge.svg
|
|
@@ -187,15 +189,15 @@ https://github.com/braindecode/braindecode/blob/master/CONTRIBUTING.md
|
|
|
187
189
|
If you use Braindecode in scientific work, please cite the software using the global
|
|
188
190
|
Zenodo DOI shown in the badge below:
|
|
189
191
|
|
|
190
|
-
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.
|
|
191
|
-
:target: https://doi.org/10.5281/zenodo.
|
|
192
|
+
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.8214376.svg
|
|
193
|
+
:target: https://doi.org/10.5281/zenodo.8214376
|
|
192
194
|
:alt: DOI
|
|
193
195
|
|
|
194
196
|
You can use the following BibTeX entry:
|
|
195
197
|
|
|
196
198
|
.. code-block:: bibtex
|
|
197
199
|
|
|
198
|
-
@
|
|
200
|
+
@misc{braindecode,
|
|
199
201
|
author = {Aristimunha, Bruno and
|
|
200
202
|
Guetschel, Pierre and
|
|
201
203
|
Wimpff, Martin and
|
|
@@ -207,17 +209,32 @@ You can use the following BibTeX entry:
|
|
|
207
209
|
Brandt, Simon and
|
|
208
210
|
Gnassounou, Théo and
|
|
209
211
|
Paillard, Joseph and
|
|
212
|
+
Srivastava, Aman and
|
|
210
213
|
{Junqueira Lopes}, Bruna and
|
|
211
214
|
Sedlar, Sara and
|
|
215
|
+
Tayal, Sarthak and
|
|
216
|
+
Truong, Young and
|
|
217
|
+
Gadonneix, Julien and
|
|
218
|
+
Mounir, Adam and
|
|
219
|
+
Zhang, Zhibo and
|
|
220
|
+
Soloviev, Anton and
|
|
221
|
+
Li, Qing and
|
|
222
|
+
Rathi, Raghav and
|
|
223
|
+
Shah, Vandit and
|
|
224
|
+
Arthur and
|
|
225
|
+
Jain, Mahir and
|
|
226
|
+
Kowshik, Bhargav and
|
|
227
|
+
Li, Yiheng and
|
|
228
|
+
Siddique, Fashad Ahmed and
|
|
212
229
|
Moreau, Thomas and
|
|
213
230
|
Chevallier, Sylvain and
|
|
214
231
|
Gramfort, Alexandre and
|
|
215
232
|
Schirrmeister, Robin Tibor},
|
|
216
233
|
title = {Braindecode: toolbox for decoding raw electrophysiological brain data
|
|
217
234
|
with deep learning models},
|
|
235
|
+
howpublished = {Zenodo},
|
|
218
236
|
url = {https://github.com/braindecode/braindecode},
|
|
219
|
-
doi = {10.5281/zenodo.
|
|
220
|
-
publisher = {Zenodo},
|
|
237
|
+
doi = {10.5281/zenodo.8214376},
|
|
221
238
|
license = {BSD-3-Clause},
|
|
222
239
|
}
|
|
223
240
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.
|
|
2
|
-
:target: https://doi.org/10.5281/zenodo.
|
|
1
|
+
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.8214376.svg
|
|
2
|
+
:target: https://doi.org/10.5281/zenodo.8214376
|
|
3
3
|
:alt: DOI
|
|
4
4
|
|
|
5
5
|
.. image:: https://github.com/braindecode/braindecode/workflows/docs/badge.svg
|
|
@@ -90,15 +90,15 @@ https://github.com/braindecode/braindecode/blob/master/CONTRIBUTING.md
|
|
|
90
90
|
If you use Braindecode in scientific work, please cite the software using the global
|
|
91
91
|
Zenodo DOI shown in the badge below:
|
|
92
92
|
|
|
93
|
-
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.
|
|
94
|
-
:target: https://doi.org/10.5281/zenodo.
|
|
93
|
+
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.8214376.svg
|
|
94
|
+
:target: https://doi.org/10.5281/zenodo.8214376
|
|
95
95
|
:alt: DOI
|
|
96
96
|
|
|
97
97
|
You can use the following BibTeX entry:
|
|
98
98
|
|
|
99
99
|
.. code-block:: bibtex
|
|
100
100
|
|
|
101
|
-
@
|
|
101
|
+
@misc{braindecode,
|
|
102
102
|
author = {Aristimunha, Bruno and
|
|
103
103
|
Guetschel, Pierre and
|
|
104
104
|
Wimpff, Martin and
|
|
@@ -110,17 +110,32 @@ You can use the following BibTeX entry:
|
|
|
110
110
|
Brandt, Simon and
|
|
111
111
|
Gnassounou, Théo and
|
|
112
112
|
Paillard, Joseph and
|
|
113
|
+
Srivastava, Aman and
|
|
113
114
|
{Junqueira Lopes}, Bruna and
|
|
114
115
|
Sedlar, Sara and
|
|
116
|
+
Tayal, Sarthak and
|
|
117
|
+
Truong, Young and
|
|
118
|
+
Gadonneix, Julien and
|
|
119
|
+
Mounir, Adam and
|
|
120
|
+
Zhang, Zhibo and
|
|
121
|
+
Soloviev, Anton and
|
|
122
|
+
Li, Qing and
|
|
123
|
+
Rathi, Raghav and
|
|
124
|
+
Shah, Vandit and
|
|
125
|
+
Arthur and
|
|
126
|
+
Jain, Mahir and
|
|
127
|
+
Kowshik, Bhargav and
|
|
128
|
+
Li, Yiheng and
|
|
129
|
+
Siddique, Fashad Ahmed and
|
|
115
130
|
Moreau, Thomas and
|
|
116
131
|
Chevallier, Sylvain and
|
|
117
132
|
Gramfort, Alexandre and
|
|
118
133
|
Schirrmeister, Robin Tibor},
|
|
119
134
|
title = {Braindecode: toolbox for decoding raw electrophysiological brain data
|
|
120
135
|
with deep learning models},
|
|
136
|
+
howpublished = {Zenodo},
|
|
121
137
|
url = {https://github.com/braindecode/braindecode},
|
|
122
|
-
doi = {10.5281/zenodo.
|
|
123
|
-
publisher = {Zenodo},
|
|
138
|
+
doi = {10.5281/zenodo.8214376},
|
|
124
139
|
license = {BSD-3-Clause},
|
|
125
140
|
}
|
|
126
141
|
|
|
@@ -206,8 +206,6 @@ def ft_surrogate(
|
|
|
206
206
|
device=device,
|
|
207
207
|
random_state=random_state,
|
|
208
208
|
)
|
|
209
|
-
if not channel_indep:
|
|
210
|
-
random_phase = torch.tile(random_phase, (1, f.shape[-2], 1))
|
|
211
209
|
if isinstance(phase_noise_magnitude, torch.Tensor):
|
|
212
210
|
phase_noise_magnitude = phase_noise_magnitude.to(device)
|
|
213
211
|
f_shifted = f * torch.exp(phase_noise_magnitude * random_phase)
|
|
@@ -1030,7 +1028,7 @@ def sensors_rotation(
|
|
|
1030
1028
|
``mne`` through::
|
|
1031
1029
|
|
|
1032
1030
|
>>> ten_twenty_montage = mne.channels.make_standard_montage(
|
|
1033
|
-
... '
|
|
1031
|
+
... 'colin27_1020'
|
|
1034
1032
|
... ).get_positions()['ch_pos']
|
|
1035
1033
|
axis : 'x' | 'y' | 'z'
|
|
1036
1034
|
Axis around which to rotate.
|
|
@@ -740,7 +740,7 @@ class SensorsRotation(Transform):
|
|
|
740
740
|
`mne` through::
|
|
741
741
|
|
|
742
742
|
>>> ten_twenty_montage = mne.channels.make_standard_montage(
|
|
743
|
-
... '
|
|
743
|
+
... 'colin27_1020'
|
|
744
744
|
... ).get_positions()['ch_pos']
|
|
745
745
|
|
|
746
746
|
axis : 'x' | 'y' | 'z', optional
|
|
@@ -12,9 +12,11 @@ import warnings
|
|
|
12
12
|
from skorch import NeuralNet
|
|
13
13
|
from skorch.callbacks import EpochScoring
|
|
14
14
|
from skorch.classifier import NeuralNetClassifier
|
|
15
|
+
from torch import Tensor
|
|
15
16
|
from torch.nn import CrossEntropyLoss
|
|
16
17
|
|
|
17
18
|
from .eegneuralnet import _EEGNeuralNet
|
|
19
|
+
from .training.losses import CroppedLoss, _class_target
|
|
18
20
|
from .training.scoring import predict_trials
|
|
19
21
|
from .util import ThrowAwayIndexLoader, update_estimator_docstring
|
|
20
22
|
|
|
@@ -173,6 +175,15 @@ class EEGClassifier(_EEGNeuralNet, NeuralNetClassifier):
|
|
|
173
175
|
loss : float
|
|
174
176
|
The loss value.
|
|
175
177
|
"""
|
|
178
|
+
# CroppedLoss pools logits before comparing them with trial targets.
|
|
179
|
+
# Composite inputs have their own target dtype contract in the loader.
|
|
180
|
+
if (
|
|
181
|
+
isinstance(y_pred, Tensor)
|
|
182
|
+
and isinstance(y_true, Tensor)
|
|
183
|
+
and not isinstance(self.criterion_, CroppedLoss)
|
|
184
|
+
and not isinstance(kwargs.get("X"), (tuple, list))
|
|
185
|
+
):
|
|
186
|
+
y_true = _class_target(y_pred, y_true)
|
|
176
187
|
return NeuralNet.get_loss(self, y_pred, y_true, *args, **kwargs)
|
|
177
188
|
|
|
178
189
|
def predict(self, X):
|
{braindecode-2.1.0.dev182465016 → braindecode-2.1.0.dev182653083}/braindecode/datasets/base.py
RENAMED
|
@@ -26,7 +26,7 @@ from itertools import chain
|
|
|
26
26
|
from operator import attrgetter
|
|
27
27
|
from pathlib import Path
|
|
28
28
|
from typing import Any, Generic, Iterable, no_type_check
|
|
29
|
-
from uuid import uuid4
|
|
29
|
+
from uuid import UUID, uuid4
|
|
30
30
|
|
|
31
31
|
import mne
|
|
32
32
|
import mne.io
|
|
@@ -204,6 +204,19 @@ def _channel_info(mne_obj):
|
|
|
204
204
|
return n_ch, type_str, sfreq
|
|
205
205
|
|
|
206
206
|
|
|
207
|
+
def _check_window_targets(targets_from, info):
|
|
208
|
+
if targets_from not in ("metadata", "channels"):
|
|
209
|
+
raise ValueError("Wrong value for parameter `targets_from`.")
|
|
210
|
+
if targets_from == "channels":
|
|
211
|
+
if not isinstance(info, mne.Info): # lazy Zarr stores hold serialized Info
|
|
212
|
+
info = mne.Info.from_json_dict(info)
|
|
213
|
+
if "misc" not in info.get_channel_types():
|
|
214
|
+
raise ValueError(
|
|
215
|
+
"targets_from='channels' requires a misc channel in the selected channels."
|
|
216
|
+
)
|
|
217
|
+
return targets_from
|
|
218
|
+
|
|
219
|
+
|
|
207
220
|
def _compute_ch_pos(info, targets_from):
|
|
208
221
|
"""Return ``(n_ch, 3)`` float32 electrode positions aligned to ``X``'s rows.
|
|
209
222
|
|
|
@@ -500,20 +513,23 @@ def _zarr_to_memmap(zarr_path, group_name):
|
|
|
500
513
|
so they can never collide with a live writer, they are never
|
|
501
514
|
read by the fast path, and they do not prevent subsequent
|
|
502
515
|
callers from producing a correct result. Caches written by
|
|
503
|
-
earlier braindecode versions remain valid
|
|
504
|
-
|
|
516
|
+
earlier braindecode versions remain valid for stores without a store ID.
|
|
517
|
+
New stores have a separate cache for each export, including overwrites.
|
|
505
518
|
"""
|
|
506
|
-
zarr_p = Path(zarr_path)
|
|
519
|
+
zarr_p = Path(zarr_path).absolute()
|
|
507
520
|
cache_dir = zarr_p.parent / f".{zarr_p.name}_memmap"
|
|
521
|
+
store_stat = zarr_p.stat()
|
|
522
|
+
root = zarr.open(str(zarr_p), mode="r")
|
|
523
|
+
store_id = root.attrs.get("store_id")
|
|
524
|
+
if store_id is not None:
|
|
525
|
+
cache_dir /= UUID(store_id).hex
|
|
508
526
|
npy_path = cache_dir / f"{group_name}.npy"
|
|
509
527
|
|
|
510
|
-
# Fast path: the file is already fully materialised. A single
|
|
511
|
-
# stat() is all the steady-state workload pays.
|
|
512
528
|
if npy_path.exists():
|
|
513
529
|
return npy_path
|
|
514
530
|
|
|
515
531
|
cache_dir.mkdir(parents=True, exist_ok=True)
|
|
516
|
-
arr =
|
|
532
|
+
arr = root[group_name]["data"]
|
|
517
533
|
# Unique per call, not per pid: threads of one process must not share it.
|
|
518
534
|
# Exclusive creation, not tempfile.mkstemp, which would make it 0600.
|
|
519
535
|
tmp_path = cache_dir / f"{group_name}.{uuid4().hex}.tmp.npy"
|
|
@@ -533,6 +549,11 @@ def _zarr_to_memmap(zarr_path, group_name):
|
|
|
533
549
|
finally:
|
|
534
550
|
del mm
|
|
535
551
|
|
|
552
|
+
# A reader on read-only media may be unable to acquire the store lock.
|
|
553
|
+
# Never publish a mixture of chunks under the previous store's ID.
|
|
554
|
+
if not os.path.samestat(store_stat, zarr_p.stat()):
|
|
555
|
+
raise OSError(f"Zarr store {zarr_p} changed while populating its cache.")
|
|
556
|
+
|
|
536
557
|
# Atomic publication. ``os.link`` never replaces an existing
|
|
537
558
|
# destination, so the published inode is immutable for the
|
|
538
559
|
# lifetime of the cache directory. Concurrent readers never
|
|
@@ -567,7 +588,14 @@ class _ZarrMixin:
|
|
|
567
588
|
_zarr_data = None
|
|
568
589
|
|
|
569
590
|
def _open_zarr(self):
|
|
570
|
-
npy_path =
|
|
591
|
+
npy_path = getattr(self, "_zarr_cache_path", None)
|
|
592
|
+
if npy_path is None or not npy_path.exists():
|
|
593
|
+
current = _zarr_to_memmap(self._zarr_path, self._group_name)
|
|
594
|
+
if npy_path is not None and current != npy_path:
|
|
595
|
+
raise FileNotFoundError(
|
|
596
|
+
f"The cache for the original Zarr store was removed: {npy_path}"
|
|
597
|
+
)
|
|
598
|
+
self._zarr_cache_path = npy_path = current
|
|
571
599
|
# 'c' = copy-on-write: reads from file, writes to RAM
|
|
572
600
|
self._zarr_data = np.load(npy_path, mmap_mode="c")
|
|
573
601
|
|
|
@@ -870,9 +898,7 @@ class EEGWindowsDataset(_ZarrMixin, RecordDataset):
|
|
|
870
898
|
self.metadata = metadata
|
|
871
899
|
|
|
872
900
|
self.last_target_only = last_target_only
|
|
873
|
-
|
|
874
|
-
raise ValueError("Wrong value for parameter `targets_from`.")
|
|
875
|
-
self.targets_from = targets_from
|
|
901
|
+
self.targets_from = _check_window_targets(targets_from, raw.info)
|
|
876
902
|
self.crop_inds = metadata.loc[
|
|
877
903
|
:, ["i_window_in_trial", "i_start_in_trial", "i_stop_in_trial"]
|
|
878
904
|
].to_numpy()
|
|
@@ -899,9 +925,7 @@ class EEGWindowsDataset(_ZarrMixin, RecordDataset):
|
|
|
899
925
|
obj._raw = None
|
|
900
926
|
obj.metadata = metadata
|
|
901
927
|
obj.last_target_only = last_target_only
|
|
902
|
-
|
|
903
|
-
raise ValueError("Wrong value for parameter `targets_from`.")
|
|
904
|
-
obj.targets_from = targets_from
|
|
928
|
+
obj.targets_from = _check_window_targets(targets_from, info_dict)
|
|
905
929
|
obj.crop_inds = metadata.loc[
|
|
906
930
|
:, ["i_window_in_trial", "i_start_in_trial", "i_stop_in_trial"]
|
|
907
931
|
].to_numpy()
|
|
@@ -960,6 +984,10 @@ class EEGWindowsDataset(_ZarrMixin, RecordDataset):
|
|
|
960
984
|
i_window_in_trial, i_start, i_stop = crop_inds
|
|
961
985
|
if self._zarr_data is not None:
|
|
962
986
|
X = self._zarr_data[:, i_start:i_stop]
|
|
987
|
+
elif isinstance(self.raw, mne.io.BaseRaw) and self.raw.preload:
|
|
988
|
+
# what raw._getitem returns, without parsing the picks on every call
|
|
989
|
+
# (an Epochs' 3-D _data must not be sliced as channels x times)
|
|
990
|
+
X = self.raw._data[:, i_start:i_stop]
|
|
963
991
|
else:
|
|
964
992
|
X = _read_fif_window(self.raw, i_start, i_stop)
|
|
965
993
|
if X is None:
|
|
@@ -976,7 +1004,10 @@ class EEGWindowsDataset(_ZarrMixin, RecordDataset):
|
|
|
976
1004
|
if self.targets_from == "metadata":
|
|
977
1005
|
y = self.y[index]
|
|
978
1006
|
else:
|
|
979
|
-
|
|
1007
|
+
# same as get_channel_types() == "misc", which is slow to call per window
|
|
1008
|
+
misc_mask = np.array(
|
|
1009
|
+
[ch["kind"] == FIFF.FIFFV_MISC_CH for ch in self.raw.info["chs"]]
|
|
1010
|
+
)
|
|
980
1011
|
if self.last_target_only:
|
|
981
1012
|
y = X[misc_mask, -1]
|
|
982
1013
|
else:
|
|
@@ -1133,9 +1164,7 @@ class WindowsDataset(_ZarrMixin, RecordDataset):
|
|
|
1133
1164
|
)
|
|
1134
1165
|
self.windows = windows
|
|
1135
1166
|
self.last_target_only = last_target_only
|
|
1136
|
-
|
|
1137
|
-
raise ValueError("Wrong value for parameter `targets_from`.")
|
|
1138
|
-
self.targets_from = targets_from
|
|
1167
|
+
self.targets_from = _check_window_targets(targets_from, windows.info)
|
|
1139
1168
|
|
|
1140
1169
|
metadata = self.windows.metadata
|
|
1141
1170
|
assert metadata is not None, "WindowsDataset requires windows with metadata."
|
|
@@ -1169,9 +1198,7 @@ class WindowsDataset(_ZarrMixin, RecordDataset):
|
|
|
1169
1198
|
obj.target_name = target_name
|
|
1170
1199
|
obj._fast_disk = False
|
|
1171
1200
|
obj.last_target_only = last_target_only
|
|
1172
|
-
|
|
1173
|
-
raise ValueError("Wrong value for parameter `targets_from`.")
|
|
1174
|
-
obj.targets_from = targets_from
|
|
1201
|
+
obj.targets_from = _check_window_targets(targets_from, info_dict)
|
|
1175
1202
|
obj.metadata = metadata
|
|
1176
1203
|
obj.crop_inds = metadata.loc[
|
|
1177
1204
|
:, ["i_window_in_trial", "i_start_in_trial", "i_stop_in_trial"]
|
|
@@ -1649,7 +1676,11 @@ class BaseConcatDataset(ConcatDataset, HubDatasetMixin, Generic[T]):
|
|
|
1649
1676
|
BaseConcatDataset, with the metadata and description information
|
|
1650
1677
|
for each window, and an ``i_dataset`` column giving the position
|
|
1651
1678
|
in ``datasets`` of the dataset (recording) each window comes from.
|
|
1652
|
-
Samplers use it to keep recordings apart.
|
|
1679
|
+
Samplers use it to keep recordings apart. If a recording description
|
|
1680
|
+
and a window have a column with the same name, the window value is
|
|
1681
|
+
retained. The recording value remains accessible on the dataset's
|
|
1682
|
+
description. For lazy fixed windows this accessor materializes the
|
|
1683
|
+
table. It reports the stored labels before any ``target_transform``.
|
|
1653
1684
|
"""
|
|
1654
1685
|
if not all(
|
|
1655
1686
|
[
|
|
@@ -1662,7 +1693,8 @@ class BaseConcatDataset(ConcatDataset, HubDatasetMixin, Generic[T]):
|
|
|
1662
1693
|
"datasets are WindowsDataset."
|
|
1663
1694
|
)
|
|
1664
1695
|
|
|
1665
|
-
|
|
1696
|
+
all_dfs = []
|
|
1697
|
+
for i_ds, ds in enumerate(self.datasets):
|
|
1666
1698
|
if hasattr(ds, "_windows") and ds._windows is not None:
|
|
1667
1699
|
df = ds._windows.metadata
|
|
1668
1700
|
else:
|
|
@@ -1684,18 +1716,19 @@ class BaseConcatDataset(ConcatDataset, HubDatasetMixin, Generic[T]):
|
|
|
1684
1716
|
"position of the dataset each window comes from. Rename it."
|
|
1685
1717
|
)
|
|
1686
1718
|
|
|
1687
|
-
all_dfs = list()
|
|
1688
|
-
for i_ds, ds in enumerate(self.datasets):
|
|
1689
|
-
if hasattr(ds, "_windows") and ds._windows is not None:
|
|
1690
|
-
df = ds._windows.metadata
|
|
1691
|
-
else:
|
|
1692
|
-
df = ds.metadata
|
|
1693
1719
|
if isinstance(df, pd.DataFrame):
|
|
1694
|
-
# copy so the description columns stay out of the dataset
|
|
1695
1720
|
df = df.copy()
|
|
1696
|
-
|
|
1721
|
+
else:
|
|
1722
|
+
# Only this public accessor materializes fixed-window lazy metadata.
|
|
1723
|
+
df = pd.DataFrame(
|
|
1724
|
+
{
|
|
1725
|
+
col: [df.loc[i, col] for i in range(len(df))]
|
|
1726
|
+
for col in df.columns
|
|
1727
|
+
}
|
|
1728
|
+
)
|
|
1697
1729
|
for k, v in description.items():
|
|
1698
|
-
|
|
1730
|
+
if k not in df.columns:
|
|
1731
|
+
df[k] = v
|
|
1699
1732
|
df["i_dataset"] = i_ds
|
|
1700
1733
|
all_dfs.append(df)
|
|
1701
1734
|
|
|
@@ -1761,6 +1794,8 @@ class BaseConcatDataset(ConcatDataset, HubDatasetMixin, Generic[T]):
|
|
|
1761
1794
|
no-op since ``__getitem__`` reads y from misc channels, not
|
|
1762
1795
|
from ``metadata['target']``).
|
|
1763
1796
|
"""
|
|
1797
|
+
windows_to_update = []
|
|
1798
|
+
raw_to_update = []
|
|
1764
1799
|
for i, ds in enumerate(self.datasets):
|
|
1765
1800
|
if isinstance(ds, (WindowsDataset, EEGWindowsDataset)):
|
|
1766
1801
|
if not isinstance(ds.metadata, pd.DataFrame):
|
|
@@ -1803,19 +1838,15 @@ class BaseConcatDataset(ConcatDataset, HubDatasetMixin, Generic[T]):
|
|
|
1803
1838
|
f"metadata cols={list(md.columns)}, "
|
|
1804
1839
|
f"description keys={desc_keys}."
|
|
1805
1840
|
)
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
# values is already a fresh list (Series.to_list() / [x] * n);
|
|
1816
|
-
# no defensive copy needed — pandas keeps its own representation
|
|
1817
|
-
# for md["target"] so mutating ds.y won't reach back into it.
|
|
1818
|
-
ds.y = values
|
|
1841
|
+
frames = [md]
|
|
1842
|
+
epochs = getattr(ds, "_windows", None)
|
|
1843
|
+
if epochs is not None and epochs.metadata is not md:
|
|
1844
|
+
frames.append(epochs.metadata)
|
|
1845
|
+
if any(frame is None or len(frame) != len(values) for frame in frames):
|
|
1846
|
+
raise ValueError(
|
|
1847
|
+
f"Window metadata must have one row per window in datasets[{i}]."
|
|
1848
|
+
)
|
|
1849
|
+
windows_to_update.append((ds, frames, values))
|
|
1819
1850
|
elif isinstance(ds, RawDataset):
|
|
1820
1851
|
if (
|
|
1821
1852
|
not isinstance(ds.description, pd.Series)
|
|
@@ -1830,12 +1861,19 @@ class BaseConcatDataset(ConcatDataset, HubDatasetMixin, Generic[T]):
|
|
|
1830
1861
|
f"Column {column!r} not found on datasets[{i}] "
|
|
1831
1862
|
f"description (keys={desc_keys})."
|
|
1832
1863
|
)
|
|
1833
|
-
ds
|
|
1864
|
+
raw_to_update.append(ds)
|
|
1834
1865
|
else:
|
|
1835
1866
|
raise TypeError(
|
|
1836
1867
|
"set_target requires WindowsDataset, EEGWindowsDataset, "
|
|
1837
1868
|
f"or RawDataset; datasets[{i}] is {type(ds).__name__}."
|
|
1838
1869
|
)
|
|
1870
|
+
# Preserve shared DataFrame objects while changing all recordings together.
|
|
1871
|
+
for ds, frames, values in windows_to_update:
|
|
1872
|
+
for frame in frames:
|
|
1873
|
+
frame["target"] = values
|
|
1874
|
+
ds.y = values
|
|
1875
|
+
for ds in raw_to_update:
|
|
1876
|
+
ds.target_name = column
|
|
1839
1877
|
return self
|
|
1840
1878
|
|
|
1841
1879
|
def set_return_ch_pos(self, value: bool = True) -> "BaseConcatDataset":
|
|
@@ -2129,6 +2167,8 @@ class BaseConcatDataset(ConcatDataset, HubDatasetMixin, Generic[T]):
|
|
|
2129
2167
|
@staticmethod
|
|
2130
2168
|
def _save_description(sub_dir, description):
|
|
2131
2169
|
description_file_path = os.path.join(sub_dir, "description.json")
|
|
2170
|
+
if description is None:
|
|
2171
|
+
description = pd.Series(dtype=object)
|
|
2132
2172
|
description.to_json(description_file_path, default_handler=str)
|
|
2133
2173
|
|
|
2134
2174
|
@staticmethod
|
|
@@ -2138,13 +2178,25 @@ class BaseConcatDataset(ConcatDataset, HubDatasetMixin, Generic[T]):
|
|
|
2138
2178
|
"window_kwargs",
|
|
2139
2179
|
"window_preproc_kwargs",
|
|
2140
2180
|
]:
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2181
|
+
kwargs = getattr(ds, kwargs_name, None)
|
|
2182
|
+
if (
|
|
2183
|
+
kwargs_name == "window_kwargs"
|
|
2184
|
+
and not kwargs
|
|
2185
|
+
and isinstance(ds, (EEGWindowsDataset, WindowsDataset))
|
|
2186
|
+
):
|
|
2187
|
+
# Directly constructed windows have no windower history.
|
|
2188
|
+
cls = (
|
|
2189
|
+
EEGWindowsDataset
|
|
2190
|
+
if isinstance(ds, EEGWindowsDataset)
|
|
2191
|
+
else WindowsDataset
|
|
2192
|
+
)
|
|
2193
|
+
settings = dict(
|
|
2194
|
+
targets_from=ds.targets_from, last_target_only=ds.last_target_only
|
|
2195
|
+
)
|
|
2196
|
+
kwargs = [(cls.__name__, settings)]
|
|
2197
|
+
if kwargs is not None:
|
|
2198
|
+
with open(os.path.join(sub_dir, f"{kwargs_name}.json"), "w") as f:
|
|
2199
|
+
json.dump(kwargs, f, indent=2)
|
|
2148
2200
|
|
|
2149
2201
|
@staticmethod
|
|
2150
2202
|
def _save_target_name(sub_dir, ds):
|