Braindecode 1.3.0.dev176089716__tar.gz → 1.3.0.dev176481332__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.
Files changed (144) hide show
  1. {braindecode-1.3.0.dev176089716/braindecode.egg-info → braindecode-1.3.0.dev176481332}/PKG-INFO +1 -1
  2. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/datasets/__init__.py +2 -2
  3. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/datasets/moabb.py +5 -15
  4. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/datautil/__init__.py +1 -11
  5. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/__init__.py +0 -4
  6. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/fbcnet.py +1 -3
  7. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/fbmsnet.py +6 -18
  8. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/summary.csv +0 -2
  9. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/util.py +0 -2
  10. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/modules/filter.py +6 -0
  11. braindecode-1.3.0.dev176481332/braindecode/preprocessing/__init__.py +61 -0
  12. braindecode-1.3.0.dev176481332/braindecode/preprocessing/mne_preprocess.py +77 -0
  13. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/preprocessing/preprocess.py +6 -16
  14. braindecode-1.3.0.dev176481332/braindecode/version.py +1 -0
  15. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332/braindecode.egg-info}/PKG-INFO +1 -1
  16. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode.egg-info/SOURCES.txt +0 -3
  17. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/docs/api.rst +18 -109
  18. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/docs/conf.py +0 -27
  19. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/docs/whats_new.rst +0 -8
  20. braindecode-1.3.0.dev176089716/braindecode/datautil/channel_utils.py +0 -114
  21. braindecode-1.3.0.dev176089716/braindecode/models/eegsym.py +0 -917
  22. braindecode-1.3.0.dev176089716/braindecode/models/medformer.py +0 -758
  23. braindecode-1.3.0.dev176089716/braindecode/preprocessing/__init__.py +0 -266
  24. braindecode-1.3.0.dev176089716/braindecode/preprocessing/mne_preprocess.py +0 -209
  25. braindecode-1.3.0.dev176089716/braindecode/version.py +0 -1
  26. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/LICENSE.txt +0 -0
  27. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/MANIFEST.in +0 -0
  28. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/NOTICE.txt +0 -0
  29. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/README.rst +0 -0
  30. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/__init__.py +0 -0
  31. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/augmentation/__init__.py +0 -0
  32. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/augmentation/base.py +0 -0
  33. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/augmentation/functional.py +0 -0
  34. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/augmentation/transforms.py +0 -0
  35. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/classifier.py +0 -0
  36. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/datasets/base.py +0 -0
  37. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/datasets/bbci.py +0 -0
  38. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/datasets/bcicomp.py +0 -0
  39. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/datasets/bids.py +0 -0
  40. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/datasets/experimental.py +0 -0
  41. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/datasets/mne.py +0 -0
  42. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/datasets/nmt.py +0 -0
  43. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/datasets/sleep_physio_challe_18.py +0 -0
  44. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/datasets/sleep_physionet.py +0 -0
  45. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/datasets/tuh.py +0 -0
  46. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/datasets/xy.py +0 -0
  47. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/datautil/serialization.py +0 -0
  48. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/datautil/util.py +0 -0
  49. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/eegneuralnet.py +0 -0
  50. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/functional/__init__.py +0 -0
  51. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/functional/functions.py +0 -0
  52. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/functional/initialization.py +0 -0
  53. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/atcnet.py +0 -0
  54. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/attentionbasenet.py +0 -0
  55. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/attn_sleep.py +0 -0
  56. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/base.py +0 -0
  57. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/bendr.py +0 -0
  58. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/biot.py +0 -0
  59. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/contrawr.py +0 -0
  60. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/ctnet.py +0 -0
  61. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/deep4.py +0 -0
  62. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/deepsleepnet.py +0 -0
  63. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/eegconformer.py +0 -0
  64. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/eeginception_erp.py +0 -0
  65. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/eeginception_mi.py +0 -0
  66. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/eegitnet.py +0 -0
  67. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/eegminer.py +0 -0
  68. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/eegnet.py +0 -0
  69. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/eegnex.py +0 -0
  70. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/eegsimpleconv.py +0 -0
  71. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/eegtcnet.py +0 -0
  72. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/fblightconvnet.py +0 -0
  73. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/hybrid.py +0 -0
  74. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/ifnet.py +0 -0
  75. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/labram.py +0 -0
  76. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/msvtnet.py +0 -0
  77. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/patchedtransformer.py +0 -0
  78. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/sccnet.py +0 -0
  79. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/shallow_fbcsp.py +0 -0
  80. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/signal_jepa.py +0 -0
  81. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/sinc_shallow.py +0 -0
  82. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/sleep_stager_blanco_2020.py +0 -0
  83. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/sleep_stager_chambon_2018.py +0 -0
  84. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/sparcnet.py +0 -0
  85. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/sstdpn.py +0 -0
  86. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/syncnet.py +0 -0
  87. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/tcn.py +0 -0
  88. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/tidnet.py +0 -0
  89. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/tsinception.py +0 -0
  90. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/models/usleep.py +0 -0
  91. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/modules/__init__.py +0 -0
  92. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/modules/activation.py +0 -0
  93. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/modules/attention.py +0 -0
  94. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/modules/blocks.py +0 -0
  95. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/modules/convolution.py +0 -0
  96. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/modules/layers.py +0 -0
  97. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/modules/linear.py +0 -0
  98. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/modules/parametrization.py +0 -0
  99. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/modules/stats.py +0 -0
  100. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/modules/util.py +0 -0
  101. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/modules/wrapper.py +0 -0
  102. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/preprocessing/eegprep_preprocess.py +0 -0
  103. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/preprocessing/util.py +0 -0
  104. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/preprocessing/windowers.py +0 -0
  105. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/regressor.py +0 -0
  106. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/samplers/__init__.py +0 -0
  107. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/samplers/base.py +0 -0
  108. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/samplers/ssl.py +0 -0
  109. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/training/__init__.py +0 -0
  110. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/training/callbacks.py +0 -0
  111. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/training/losses.py +0 -0
  112. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/training/scoring.py +0 -0
  113. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/util.py +0 -0
  114. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/visualization/__init__.py +0 -0
  115. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/visualization/confusion_matrices.py +0 -0
  116. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode/visualization/gradients.py +0 -0
  117. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode.egg-info/dependency_links.txt +0 -0
  118. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode.egg-info/requires.txt +0 -0
  119. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/braindecode.egg-info/top_level.txt +0 -0
  120. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/docs/Makefile +0 -0
  121. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/docs/_templates/autosummary/class.rst +0 -0
  122. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/docs/_templates/autosummary/function.rst +0 -0
  123. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/docs/cite.rst +0 -0
  124. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/docs/help.rst +0 -0
  125. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/docs/index.rst +0 -0
  126. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/docs/install/install.rst +0 -0
  127. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/docs/install/install_pip.rst +0 -0
  128. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/docs/install/install_source.rst +0 -0
  129. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/docs/models/categorization/attention.rst +0 -0
  130. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/docs/models/categorization/channel.rst +0 -0
  131. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/docs/models/categorization/convolution.rst +0 -0
  132. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/docs/models/categorization/filterbank.rst +0 -0
  133. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/docs/models/categorization/gnn.rst +0 -0
  134. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/docs/models/categorization/interpretable.rst +0 -0
  135. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/docs/models/categorization/lbm.rst +0 -0
  136. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/docs/models/categorization/recurrent.rst +0 -0
  137. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/docs/models/categorization/spd.rst +0 -0
  138. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/docs/models/models.rst +0 -0
  139. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/docs/models/models_categorization.rst +0 -0
  140. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/docs/models/models_table.rst +0 -0
  141. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/docs/models/models_visualization.rst +0 -0
  142. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/docs/sg_execution_times.rst +0 -0
  143. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/pyproject.toml +0 -0
  144. {braindecode-1.3.0.dev176089716 → braindecode-1.3.0.dev176481332}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: braindecode
3
- Version: 1.3.0.dev176089716
3
+ Version: 1.3.0.dev176481332
4
4
  Summary: Deep learning software to decode EEG, ECG or MEG signals
5
5
  Author-email: Robin Tibor Schirrmeister <robintibor@gmail.com>
6
6
  Maintainer-email: Alexandre Gramfort <agramfort@meta.com>, Bruno Aristimunha Pinto <b.aristimunha@gmail.com>, Robin Tibor Schirrmeister <robintibor@gmail.com>
@@ -12,7 +12,7 @@ from .base import (
12
12
  from .bcicomp import BCICompetitionIVDataset4
13
13
  from .bids import BIDSDataset, BIDSEpochsDataset
14
14
  from .mne import create_from_mne_epochs, create_from_mne_raw
15
- from .moabb import BNCI2014_001, HGD, MOABBDataset
15
+ from .moabb import BNCI2014001, HGD, MOABBDataset
16
16
  from .nmt import NMT
17
17
  from .sleep_physio_challe_18 import SleepPhysionetChallenge2018
18
18
  from .sleep_physionet import SleepPhysionet
@@ -29,7 +29,7 @@ __all__ = [
29
29
  "BIDSEpochsDataset",
30
30
  "MOABBDataset",
31
31
  "HGD",
32
- "BNCI2014_001",
32
+ "BNCI2014001",
33
33
  "create_from_mne_raw",
34
34
  "create_from_mne_epochs",
35
35
  "TUH",
@@ -15,7 +15,6 @@ from typing import Any
15
15
 
16
16
  import mne
17
17
  import pandas as pd
18
- from mne.utils import deprecated
19
18
 
20
19
  from braindecode.util import _update_moabb_docstring
21
20
 
@@ -170,8 +169,8 @@ class MOABBDataset(BaseConcatDataset):
170
169
  super().__init__(all_base_ds)
171
170
 
172
171
 
173
- class BNCI2014_001(MOABBDataset):
174
- doc = """See moabb.datasets.bnci.BNCI2014_001
172
+ class BNCI2014001(MOABBDataset):
173
+ doc = """See moabb.datasets.bnci.BNCI2014001
175
174
 
176
175
  Parameters
177
176
  ----------
@@ -180,14 +179,14 @@ class BNCI2014_001(MOABBDataset):
180
179
  subjects is fetched.
181
180
  """
182
181
  try:
183
- from moabb.datasets import BNCI2014_001
182
+ from moabb.datasets import BNCI2014001
184
183
 
185
- __doc__ = _update_moabb_docstring(BNCI2014_001, doc)
184
+ __doc__ = _update_moabb_docstring(BNCI2014001, doc)
186
185
  except ModuleNotFoundError:
187
186
  pass # keep moabb soft dependency, otherwise crash on loading of datasets.__init__.py
188
187
 
189
188
  def __init__(self, subject_ids):
190
- super().__init__("BNCI2014_001", subject_ids=subject_ids)
189
+ super().__init__("BNCI2014001", subject_ids=subject_ids)
191
190
 
192
191
 
193
192
  class HGD(MOABBDataset):
@@ -208,12 +207,3 @@ class HGD(MOABBDataset):
208
207
 
209
208
  def __init__(self, subject_ids):
210
209
  super().__init__("Schirrmeister2017", subject_ids=subject_ids)
211
-
212
-
213
- @deprecated(
214
- "`BNCI2014001` was renamed to `BNCI2014_001` in v1.13; this alias will be removed in v1.14."
215
- )
216
- class BNCI2014001(BNCI2014_001):
217
- """Deprecated alias for BNCI2014001."""
218
-
219
- pass
@@ -2,10 +2,6 @@
2
2
  Utilities for data manipulation.
3
3
  """
4
4
 
5
- from .channel_utils import (
6
- division_channels_idx,
7
- match_hemisphere_chans,
8
- )
9
5
  from .serialization import (
10
6
  _check_save_dir_empty,
11
7
  load_concat_dataset,
@@ -53,10 +49,4 @@ def __getattr__(name):
53
49
  raise AttributeError("No possible import named " + name)
54
50
 
55
51
 
56
- __all__ = [
57
- "load_concat_dataset",
58
- "save_concat_dataset",
59
- "_check_save_dir_empty",
60
- "match_hemisphere_chans",
61
- "division_channels_idx",
62
- ]
52
+ __all__ = ["load_concat_dataset", "save_concat_dataset", "_check_save_dir_empty"]
@@ -20,7 +20,6 @@ from .eegminer import EEGMiner
20
20
  from .eegnet import EEGNet, EEGNetv4
21
21
  from .eegnex import EEGNeX
22
22
  from .eegsimpleconv import EEGSimpleConv
23
- from .eegsym import EEGSym
24
23
  from .eegtcnet import EEGTCNet
25
24
  from .fbcnet import FBCNet
26
25
  from .fblightconvnet import FBLightConvNet
@@ -28,7 +27,6 @@ from .fbmsnet import FBMSNet
28
27
  from .hybrid import HybridNet
29
28
  from .ifnet import IFNet
30
29
  from .labram import Labram
31
- from .medformer import MEDFormer
32
30
  from .msvtnet import MSVTNet
33
31
  from .patchedtransformer import PBT
34
32
  from .sccnet import SCCNet
@@ -74,7 +72,6 @@ __all__ = [
74
72
  "EEGNet",
75
73
  "EEGNetv4",
76
74
  "EEGNeX",
77
- "EEGSym",
78
75
  "EEGSimpleConv",
79
76
  "EEGTCNet",
80
77
  "FBCNet",
@@ -83,7 +80,6 @@ __all__ = [
83
80
  "HybridNet",
84
81
  "IFNet",
85
82
  "Labram",
86
- "MEDFormer",
87
83
  "MSVTNet",
88
84
  "PBT",
89
85
  "SCCNet",
@@ -69,9 +69,7 @@ class FBCNet(EEGModuleMixin, nn.Module):
69
69
  linear_max_norm : float, default=0.5
70
70
  Maximum norm for the final linear layer.
71
71
  filter_parameters: dict, default None
72
- Dictionary of parameters to use for the FilterBankLayer.
73
- If None, a default Chebyshev Type II filter with transition bandwidth of
74
- 2 Hz and stop-band ripple of 30 dB will be used.
72
+ Parameters for the FilterBankLayer
75
73
 
76
74
  References
77
75
  ----------
@@ -1,6 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
- from typing import Any, Sequence
3
+ from typing import Optional, Sequence
4
4
 
5
5
  import torch
6
6
  from einops.layers.torch import Rearrange
@@ -57,28 +57,16 @@ class FBMSNet(EEGModuleMixin, nn.Module):
57
57
  ----------
58
58
  n_bands : int, default=9
59
59
  Number of input channels (e.g., number of frequency bands).
60
- n_filters_spat : int, default=36
61
- Number of output channels from the MixedConv2d layer.
62
- temporal_layer : str, default='LogVarLayer'
63
- Temporal aggregation layer to use.
64
- n_dim: int, default=3
65
- Dimension of the temporal reduction layer.
66
60
  stride_factor : int, default=4
67
61
  Stride factor for temporal segmentation.
62
+ temporal_layer : str, default='LogVarLayer'
63
+ Temporal aggregation layer to use.
64
+ n_filters_spat : int, default=36
65
+ Number of output channels from the MixedConv2d layer.
68
66
  dilatability : int, default=8
69
67
  Expansion factor for the spatial convolution block.
70
68
  activation : nn.Module, default=nn.SiLU
71
69
  Activation function class to apply.
72
- kernels_weights : Sequence[int], default=(15, 31, 63, 125)
73
- Kernel sizes for the MixedConv2d layer.
74
- cnn_max_norm : float, default=2
75
- Maximum norm constraint for the convolutional layers.
76
- linear_max_norm : float, default=0.5
77
- Maximum norm constraint for the linear layers.
78
- filter_parameters : dict, default=None
79
- Dictionary of parameters to use for the FilterBankLayer.
80
- If None, a default Chebyshev Type II filter with transition bandwidth of
81
- 2 Hz and stop-band ripple of 30 dB will be used.
82
70
  verbose: bool, default False
83
71
  Verbose parameter to create the filter using mne.
84
72
 
@@ -115,7 +103,7 @@ class FBMSNet(EEGModuleMixin, nn.Module):
115
103
  cnn_max_norm: float = 2,
116
104
  linear_max_norm: float = 0.5,
117
105
  verbose: bool = False,
118
- filter_parameters: dict[Any, Any] | None = None,
106
+ filter_parameters: Optional[dict] = None,
119
107
  ):
120
108
  super().__init__(
121
109
  n_chans=n_chans,
@@ -13,7 +13,6 @@ EEGInceptionMI,Motor Imagery,Classification,250,"n_chans, n_outputs, n_times",55
13
13
  EEGITNet,Motor Imagery,Classification,125,"n_chans, n_outputs, n_times",5212,"EEGITNet(n_chans=22, n_outputs=4, n_times=500)","Convolution,Recurrent"
14
14
  EEGNet,General,Classification,128,"n_chans, n_outputs, n_times",2484,"EEGNet(n_chans=22, n_outputs=4, n_times=512)","Convolution"
15
15
  EEGNeX,Motor Imagery,Classification,125,"n_chans, n_outputs, n_times",55940,"EEGNeX(n_chans=22, n_outputs=4, n_times=500)","Convolution"
16
- EEGSym,Motor Imagery,Classification,250,"n_chans, n_outputs, n_times, sfreq",299218,"EEGSym(n_chans=22, n_outputs=4, n_times=1000, sfreq=250)","Convolution,Channel"
17
16
  EEGMiner,Emotion Recognition,Classification,128,"n_chans, n_outputs, n_times, sfreq",7572,"EEGMiner(n_chans=62, n_outputs=2, n_times=2560, sfreq=128)","Convolution,Interpretability"
18
17
  EEGSimpleConv,Motor Imagery,Classification,80,"n_chans, n_outputs, sfreq",730404,"EEGSimpleConv(n_chans=22, n_outputs=4, n_times=320, sfreq=80)","Convolution"
19
18
  EEGTCNet,Motor Imagery,Classification,250,"n_chans, n_outputs",4516,"EEGTCNet(n_chans=22, n_outputs=4, n_times=1000, kern_length=32)","Convolution,Recurrent"
@@ -41,4 +40,3 @@ IFNet,Motor Imagery,Classification,250,"n_chans, n_outputs, n_times, sfreq",9860
41
40
  PBT,General,Classification,250,"n_chans, n_outputs, n_times",818948,"PBT(n_chans=22, n_outputs=4, n_times=1000, sfreq=250)","Large Brain Model"
42
41
  SSTDPN,Motor Imagery,Classification,250,"n_chans, n_outputs, n_times",19502,"SSTDPN(n_chans=22, n_outputs=4, n_times=1000)","Convolution,Small Attention"
43
42
  BENDR,General,"Classification,Embedding",250,"n_chans, n_times, n_outputs",157141049,"BENDR(n_chans=22, n_outputs=4, n_times=1000)","Large Brain Model,Convolution"
44
- MEDFormer,General,Classification,250,"n_chans, n_outputs, n_times",5313924,"MEDFormer(n_chans=22, n_outputs=4, n_times=1000)","Large Brain Model,Convolution"
@@ -79,7 +79,6 @@ models_mandatory_parameters = [
79
79
  ("SPARCNet", ["n_chans", "n_outputs", "n_times"], None),
80
80
  ("ContraWR", ["n_chans", "n_outputs", "sfreq", "n_times"], dict(sfreq=200.0)),
81
81
  ("EEGNeX", ["n_chans", "n_outputs", "n_times"], None),
82
- ("EEGSym", ["chs_info", "n_chans", "n_outputs", "n_times", "sfreq"], None),
83
82
  ("TSception", ["n_chans", "n_outputs", "n_times", "sfreq"], dict(sfreq=200.0)),
84
83
  ("EEGTCNet", ["n_chans", "n_outputs", "n_times"], None),
85
84
  ("SyncNet", ["n_chans", "n_outputs", "n_times"], None),
@@ -99,7 +98,6 @@ models_mandatory_parameters = [
99
98
  ("PBT", ["n_chans", "n_outputs", "n_times"], None),
100
99
  ("SSTDPN", ["n_chans", "n_outputs", "n_times", "sfreq"], None),
101
100
  ("BENDR", ["n_chans", "n_outputs", "n_times"], None),
102
- ("MEDFormer", ["n_chans", "n_outputs", "n_times"], None),
103
101
  ]
104
102
 
105
103
  ################################################################
@@ -109,6 +109,11 @@ class FilterBankLayer(nn.Module):
109
109
  or "firwin2" to use :func:`scipy.signal.firwin2`. "firwin" uses
110
110
  a time-domain design technique that generally gives improved
111
111
  attenuation using fewer samples than "firwin2".
112
+ pad : str, default='reflect_limited'
113
+ The type of padding to use. Supports all func:`numpy.pad()` mode options.
114
+ Can also be "reflect_limited", which pads with a reflected version of
115
+ each vector mirrored on the first and last values of the vector,
116
+ followed by zeros. Only used for ``method='fir'``.
112
117
  verbose: bool | str | int | None, default=True
113
118
  Control verbosity of the logging output. If ``None``, use the default
114
119
  verbosity level. See the func:`mne.verbose` for details.
@@ -178,6 +183,7 @@ class FilterBankLayer(nn.Module):
178
183
  "The band_filters items should be splitable in 2 values."
179
184
  )
180
185
 
186
+ # and we accepted as
181
187
  self.band_filters = band_filters
182
188
  self.n_bands = len(band_filters)
183
189
  self.phase = phase
@@ -0,0 +1,61 @@
1
+ from .eegprep_preprocess import (
2
+ EEGPrep,
3
+ ReinterpolateRemovedChannels,
4
+ RemoveBadChannels,
5
+ RemoveBadChannelsNoLocs,
6
+ RemoveBadWindows,
7
+ RemoveBursts,
8
+ RemoveCommonAverageReference,
9
+ RemoveDCOffset,
10
+ RemoveDrifts,
11
+ RemoveFlatChannels,
12
+ Resampling,
13
+ )
14
+ from .mne_preprocess import ( # type: ignore[attr-defined]
15
+ Crop,
16
+ DropChannels,
17
+ Filter,
18
+ Pick,
19
+ Resample,
20
+ SetEEGReference,
21
+ )
22
+ from .preprocess import (
23
+ Preprocessor,
24
+ exponential_moving_demean,
25
+ exponential_moving_standardize,
26
+ filterbank,
27
+ preprocess,
28
+ )
29
+ from .windowers import (
30
+ create_fixed_length_windows,
31
+ create_windows_from_events,
32
+ create_windows_from_target_channels,
33
+ )
34
+
35
+ __all__ = [
36
+ "exponential_moving_demean",
37
+ "exponential_moving_standardize",
38
+ "filterbank",
39
+ "preprocess",
40
+ "Preprocessor",
41
+ "Resample",
42
+ "DropChannels",
43
+ "SetEEGReference",
44
+ "Filter",
45
+ "Pick",
46
+ "Crop",
47
+ "EEGPrep",
48
+ "RemoveDCOffset",
49
+ "Resampling",
50
+ "RemoveFlatChannels",
51
+ "RemoveDrifts",
52
+ "RemoveBadChannels",
53
+ "RemoveBadChannelsNoLocs",
54
+ "RemoveBursts",
55
+ "RemoveBadWindows",
56
+ "ReinterpolateRemovedChannels",
57
+ "RemoveCommonAverageReference",
58
+ "create_windows_from_events",
59
+ "create_fixed_length_windows",
60
+ "create_windows_from_target_channels",
61
+ ]
@@ -0,0 +1,77 @@
1
+ """Preprocessor objects based on mne methods."""
2
+
3
+ # Authors: Bruna Lopes <brunajaflopes@gmail.com>
4
+ # Bruno Aristimunha <b.aristimunha@gmail.com>
5
+ #
6
+ # License: BSD-3
7
+ import inspect
8
+
9
+ import mne.io
10
+
11
+ from braindecode.preprocessing.preprocess import Preprocessor
12
+ from braindecode.util import _update_moabb_docstring
13
+
14
+
15
+ def _generate_init_method(func):
16
+ """
17
+ Generate an __init__ method for a class based on the function's signature.
18
+ """
19
+ parameters = list(inspect.signature(func).parameters.values())
20
+ param_names = [param.name for param in parameters]
21
+
22
+ def init_method(self, *args, **kwargs):
23
+ for name, value in zip(param_names, args):
24
+ setattr(self, name, value)
25
+ for name, value in kwargs.items():
26
+ setattr(self, name, value)
27
+ self.kwargs = kwargs
28
+
29
+ init_method.__signature__ = inspect.signature(func)
30
+ return init_method
31
+
32
+
33
+ def _generate_mne_pre_processor(function):
34
+ """
35
+ Generate a class based on an MNE function for preprocessing.
36
+ """
37
+ class_name = "".join(word.title() for word in function.__name__.split("_")).replace(
38
+ "Eeg", "EEG"
39
+ )
40
+ import_path = f"{function.__module__}.{function.__name__}"
41
+ doc = f" See more details in {import_path}"
42
+
43
+ base_classes = (Preprocessor,)
44
+ class_attrs = {
45
+ "__init__": _generate_init_method(function),
46
+ "__doc__": _update_moabb_docstring(function, doc),
47
+ "fn": function.__name__,
48
+ }
49
+ generated_class = type(class_name, base_classes, class_attrs)
50
+
51
+ return generated_class
52
+
53
+
54
+ # List of MNE functions to generate classes for
55
+ mne_functions = [
56
+ mne.filter.resample,
57
+ mne.io.Raw.drop_channels,
58
+ mne.io.Raw.filter,
59
+ mne.io.Raw.crop,
60
+ mne.io.Raw.pick,
61
+ mne.io.Raw.set_eeg_reference,
62
+ ]
63
+
64
+ # Automatically generate and add classes to the global namespace
65
+ for function in mne_functions:
66
+ class_obj = _generate_mne_pre_processor(function)
67
+ globals()[class_obj.__name__] = class_obj
68
+
69
+ # Define __all__ based on the generated class names
70
+ __all__ = [
71
+ class_obj.__name__
72
+ for class_obj in globals().values()
73
+ if isinstance(class_obj, type)
74
+ ]
75
+
76
+ # Clean up unnecessary variables
77
+ del mne_functions, function, class_obj
@@ -85,7 +85,7 @@ class Preprocessor(object):
85
85
 
86
86
  def apply(self, raw_or_epochs: BaseRaw | BaseEpochs):
87
87
  try:
88
- return self._try_apply(raw_or_epochs)
88
+ self._try_apply(raw_or_epochs)
89
89
  except RuntimeError:
90
90
  # Maybe the function needs the data to be loaded and the data was
91
91
  # not loaded yet. Not all MNE functions need data to be loaded,
@@ -93,20 +93,15 @@ class Preprocessor(object):
93
93
  # without preloading data which can make the overall preprocessing
94
94
  # pipeline substantially faster.
95
95
  raw_or_epochs.load_data()
96
- return self._try_apply(raw_or_epochs)
96
+ self._try_apply(raw_or_epochs)
97
97
 
98
98
  def _try_apply(self, raw_or_epochs):
99
99
  if callable(self.fn):
100
- result = self.fn(raw_or_epochs, **self.kwargs)
101
- # For standalone functions that return a new object, propagate it back
102
- if result is not None and result is not raw_or_epochs:
103
- return result
104
- return raw_or_epochs
100
+ self.fn(raw_or_epochs, **self.kwargs)
105
101
  else:
106
102
  if not hasattr(raw_or_epochs, self.fn):
107
103
  raise AttributeError(f"MNE object does not have a {self.fn} method.")
108
104
  getattr(raw_or_epochs, self.fn)(**self.kwargs)
109
- return raw_or_epochs
110
105
 
111
106
 
112
107
  def preprocess(
@@ -256,21 +251,16 @@ def _preprocess(
256
251
  if raw_or_epochs.preload and copy_data:
257
252
  raw_or_epochs._data = raw_or_epochs._data.copy()
258
253
  for preproc in preprocessors:
259
- raw_or_epochs = preproc.apply(raw_or_epochs)
260
- return raw_or_epochs
254
+ preproc.apply(raw_or_epochs)
261
255
 
262
256
  if hasattr(ds, "raw"):
263
257
  if isinstance(ds, EEGWindowsDataset):
264
258
  warn(
265
259
  f"Applying preprocessors {preprocessors} to the mne.io.Raw of an EEGWindowsDataset."
266
260
  )
267
- processed = _preprocess_raw_or_epochs(ds.raw, preprocessors)
268
- if processed is not ds.raw:
269
- ds.raw = processed
261
+ _preprocess_raw_or_epochs(ds.raw, preprocessors)
270
262
  elif hasattr(ds, "windows"):
271
- processed = _preprocess_raw_or_epochs(ds.windows, preprocessors)
272
- if processed is not ds.windows:
273
- ds.windows = processed
263
+ _preprocess_raw_or_epochs(ds.windows, preprocessors)
274
264
  else:
275
265
  raise ValueError(
276
266
  "Can only preprocess concatenation of RecordDataset, "
@@ -0,0 +1 @@
1
+ __version__ = "1.3.0.dev176481332"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: braindecode
3
- Version: 1.3.0.dev176089716
3
+ Version: 1.3.0.dev176481332
4
4
  Summary: Deep learning software to decode EEG, ECG or MEG signals
5
5
  Author-email: Robin Tibor Schirrmeister <robintibor@gmail.com>
6
6
  Maintainer-email: Alexandre Gramfort <agramfort@meta.com>, Bruno Aristimunha Pinto <b.aristimunha@gmail.com>, Robin Tibor Schirrmeister <robintibor@gmail.com>
@@ -33,7 +33,6 @@ braindecode/datasets/sleep_physionet.py
33
33
  braindecode/datasets/tuh.py
34
34
  braindecode/datasets/xy.py
35
35
  braindecode/datautil/__init__.py
36
- braindecode/datautil/channel_utils.py
37
36
  braindecode/datautil/serialization.py
38
37
  braindecode/datautil/util.py
39
38
  braindecode/functional/__init__.py
@@ -58,7 +57,6 @@ braindecode/models/eegminer.py
58
57
  braindecode/models/eegnet.py
59
58
  braindecode/models/eegnex.py
60
59
  braindecode/models/eegsimpleconv.py
61
- braindecode/models/eegsym.py
62
60
  braindecode/models/eegtcnet.py
63
61
  braindecode/models/fbcnet.py
64
62
  braindecode/models/fblightconvnet.py
@@ -66,7 +64,6 @@ braindecode/models/fbmsnet.py
66
64
  braindecode/models/hybrid.py
67
65
  braindecode/models/ifnet.py
68
66
  braindecode/models/labram.py
69
- braindecode/models/medformer.py
70
67
  braindecode/models/msvtnet.py
71
68
  braindecode/models/patchedtransformer.py
72
69
  braindecode/models/sccnet.py
@@ -73,14 +73,12 @@ save and load models from the Hugging Face Hub, if the ``braindecode[hug]`` pack
73
73
  EEGNet
74
74
  EEGNeX
75
75
  EEGSimpleConv
76
- EEGSym
77
76
  EEGTCNet
78
77
  FBCNet
79
78
  FBLightConvNet
80
79
  FBMSNet
81
80
  IFNet
82
81
  Labram
83
- MEDFormer
84
82
  MSVTNet
85
83
  PBT
86
84
  SCCNet
@@ -333,7 +331,7 @@ Common Datasets
333
331
  :toctree: generated/
334
332
 
335
333
  BCICompetitionIVDataset4
336
- BNCI2014_001
334
+ BNCI2014001
337
335
  HGD
338
336
  MOABBDataset
339
337
  NMT
@@ -365,28 +363,37 @@ Preprocessing
365
363
 
366
364
  .. currentmodule:: braindecode.preprocessing
367
365
 
368
- Core Functions
369
- ''''''''''''''
370
-
371
366
  .. autosummary::
372
367
  :toctree: generated/
373
368
 
374
- preprocess
375
- Preprocessor
376
369
  create_windows_from_events
377
370
  create_fixed_length_windows
378
371
  create_windows_from_target_channels
379
372
  exponential_moving_demean
380
373
  exponential_moving_standardize
381
374
  filterbank
375
+ preprocess
376
+ Preprocessor
377
+ EEGPrep
382
378
 
383
- EEGPrep Pipeline
384
- ''''''''''''''''
379
+
380
+ Preprocessing Transform
381
+ ''''''''''''''''''''''''
382
+
383
+ These modules implement various preprocessing transforms that can be applied
384
+ to EEG data, including cropping, filtering, resampling, and channel selection.
385
+
386
+ :py:mod:`braindecode.preprocessing`:
387
+
388
+ .. currentmodule:: braindecode.preprocessing
385
389
 
386
390
  .. autosummary::
387
391
  :toctree: generated/
388
392
 
389
- EEGPrep
393
+ Crop
394
+ DropChannels
395
+ Filter
396
+ Pick
390
397
  ReinterpolateRemovedChannels
391
398
  RemoveBadChannels
392
399
  RemoveBadChannelsNoLocs
@@ -396,107 +403,9 @@ EEGPrep Pipeline
396
403
  RemoveDCOffset
397
404
  RemoveDrifts
398
405
  RemoveFlatChannels
399
-
400
- Signal Processing
401
- '''''''''''''''''
402
-
403
- .. autosummary::
404
- :toctree: generated/
405
-
406
406
  Resample
407
407
  Resampling
408
- Filter
409
- FilterData
410
- NotchFilter
411
- SavgolFilter
412
- ApplyHilbert
413
- Rescale
414
- OversampledTemporalProjection
415
-
416
- Channel Management
417
- ''''''''''''''''''
418
-
419
- .. autosummary::
420
- :toctree: generated/
421
-
422
- Pick
423
- PickChannels
424
- PickTypes
425
- DropChannels
426
- AddChannels
427
- CombineChannels
428
- RenameChannels
429
- ReorderChannels
430
- SetChannelTypes
431
- InterpolateBads
432
- InterpolateTo
433
- InterpolateBridgedElectrodes
434
- ComputeBridgedElectrodes
435
- EqualizeChannels
436
- EqualizeBads
437
- FindBadChannelsLof
438
-
439
- Reference & Montage
440
- '''''''''''''''''''
441
-
442
- .. autosummary::
443
- :toctree: generated/
444
-
445
408
  SetEEGReference
446
- SetBipolarReference
447
- AddReferenceChannels
448
- SetMontage
449
-
450
- SSP Projections
451
- '''''''''''''''
452
-
453
- .. autosummary::
454
- :toctree: generated/
455
-
456
- AddProj
457
- ApplyProj
458
- DelProj
459
-
460
- Data Transformation
461
- '''''''''''''''''''
462
-
463
- .. autosummary::
464
- :toctree: generated/
465
-
466
- Crop
467
- CropByAnnotations
468
- ComputeCurrentSourceDensity
469
- FixStimArtifact
470
- MaxwellFilter
471
- RealignRaw
472
- RegressArtifact
473
-
474
- Artifact Detection & Annotation
475
- ''''''''''''''''''''''''''''''''
476
-
477
- .. autosummary::
478
- :toctree: generated/
479
-
480
- AnnotateAmplitude
481
- AnnotateBreak
482
- AnnotateMovement
483
- AnnotateMuscleZscore
484
- AnnotateNan
485
-
486
- Metadata & Configuration
487
- '''''''''''''''''''''''''
488
-
489
- .. autosummary::
490
- :toctree: generated/
491
-
492
- Anonymize
493
- SetAnnotations
494
- SetMeasDate
495
- AddEvents
496
- FixMagCoilTypes
497
- ApplyGradientCompensation
498
-
499
-
500
409
 
501
410
 
502
411
  Data Utils