braindecode 1.3.0.dev177069446__py3-none-any.whl → 1.3.0.dev177628147__py3-none-any.whl

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 (106) hide show
  1. braindecode/augmentation/__init__.py +3 -5
  2. braindecode/augmentation/base.py +5 -8
  3. braindecode/augmentation/functional.py +22 -25
  4. braindecode/augmentation/transforms.py +42 -51
  5. braindecode/classifier.py +16 -11
  6. braindecode/datasets/__init__.py +3 -5
  7. braindecode/datasets/base.py +13 -17
  8. braindecode/datasets/bbci.py +14 -13
  9. braindecode/datasets/bcicomp.py +5 -4
  10. braindecode/datasets/{bids/datasets.py → bids.py} +18 -12
  11. braindecode/datasets/{bids/iterable.py → experimental.py} +6 -8
  12. braindecode/datasets/{bids/hub.py → hub.py} +350 -375
  13. braindecode/datasets/{bids/hub_validation.py → hub_validation.py} +1 -2
  14. braindecode/datasets/mne.py +19 -19
  15. braindecode/datasets/moabb.py +10 -10
  16. braindecode/datasets/nmt.py +56 -58
  17. braindecode/datasets/sleep_physio_challe_18.py +5 -3
  18. braindecode/datasets/sleep_physionet.py +5 -5
  19. braindecode/datasets/tuh.py +18 -21
  20. braindecode/datasets/xy.py +9 -10
  21. braindecode/datautil/__init__.py +3 -3
  22. braindecode/datautil/serialization.py +20 -22
  23. braindecode/datautil/util.py +7 -120
  24. braindecode/eegneuralnet.py +52 -22
  25. braindecode/functional/functions.py +10 -7
  26. braindecode/functional/initialization.py +2 -3
  27. braindecode/models/__init__.py +3 -5
  28. braindecode/models/atcnet.py +39 -43
  29. braindecode/models/attentionbasenet.py +41 -37
  30. braindecode/models/attn_sleep.py +24 -26
  31. braindecode/models/base.py +6 -6
  32. braindecode/models/bendr.py +26 -50
  33. braindecode/models/biot.py +30 -61
  34. braindecode/models/contrawr.py +5 -5
  35. braindecode/models/ctnet.py +35 -35
  36. braindecode/models/deep4.py +5 -5
  37. braindecode/models/deepsleepnet.py +7 -7
  38. braindecode/models/eegconformer.py +26 -31
  39. braindecode/models/eeginception_erp.py +2 -2
  40. braindecode/models/eeginception_mi.py +6 -6
  41. braindecode/models/eegitnet.py +5 -5
  42. braindecode/models/eegminer.py +1 -1
  43. braindecode/models/eegnet.py +3 -3
  44. braindecode/models/eegnex.py +2 -2
  45. braindecode/models/eegsimpleconv.py +2 -2
  46. braindecode/models/eegsym.py +7 -7
  47. braindecode/models/eegtcnet.py +6 -6
  48. braindecode/models/fbcnet.py +2 -2
  49. braindecode/models/fblightconvnet.py +3 -3
  50. braindecode/models/fbmsnet.py +3 -3
  51. braindecode/models/hybrid.py +2 -2
  52. braindecode/models/ifnet.py +5 -5
  53. braindecode/models/labram.py +46 -70
  54. braindecode/models/luna.py +5 -60
  55. braindecode/models/medformer.py +21 -23
  56. braindecode/models/msvtnet.py +15 -15
  57. braindecode/models/patchedtransformer.py +55 -55
  58. braindecode/models/sccnet.py +2 -2
  59. braindecode/models/shallow_fbcsp.py +3 -5
  60. braindecode/models/signal_jepa.py +12 -39
  61. braindecode/models/sinc_shallow.py +4 -3
  62. braindecode/models/sleep_stager_blanco_2020.py +2 -2
  63. braindecode/models/sleep_stager_chambon_2018.py +2 -2
  64. braindecode/models/sparcnet.py +8 -8
  65. braindecode/models/sstdpn.py +869 -869
  66. braindecode/models/summary.csv +17 -19
  67. braindecode/models/syncnet.py +2 -2
  68. braindecode/models/tcn.py +5 -5
  69. braindecode/models/tidnet.py +3 -3
  70. braindecode/models/tsinception.py +3 -3
  71. braindecode/models/usleep.py +7 -7
  72. braindecode/models/util.py +14 -165
  73. braindecode/modules/__init__.py +1 -9
  74. braindecode/modules/activation.py +3 -29
  75. braindecode/modules/attention.py +0 -123
  76. braindecode/modules/blocks.py +1 -53
  77. braindecode/modules/convolution.py +0 -53
  78. braindecode/modules/filter.py +0 -31
  79. braindecode/modules/layers.py +0 -84
  80. braindecode/modules/linear.py +1 -22
  81. braindecode/modules/stats.py +0 -10
  82. braindecode/modules/util.py +0 -9
  83. braindecode/modules/wrapper.py +0 -17
  84. braindecode/preprocessing/preprocess.py +0 -3
  85. braindecode/regressor.py +18 -15
  86. braindecode/samplers/ssl.py +1 -1
  87. braindecode/util.py +28 -38
  88. braindecode/version.py +1 -1
  89. braindecode-1.3.0.dev177628147.dist-info/METADATA +202 -0
  90. braindecode-1.3.0.dev177628147.dist-info/RECORD +114 -0
  91. braindecode/datasets/bids/__init__.py +0 -54
  92. braindecode/datasets/bids/format.py +0 -717
  93. braindecode/datasets/bids/hub_format.py +0 -717
  94. braindecode/datasets/bids/hub_io.py +0 -197
  95. braindecode/datasets/chb_mit.py +0 -163
  96. braindecode/datasets/siena.py +0 -162
  97. braindecode/datasets/utils.py +0 -67
  98. braindecode/models/brainmodule.py +0 -845
  99. braindecode/models/config.py +0 -233
  100. braindecode/models/reve.py +0 -843
  101. braindecode-1.3.0.dev177069446.dist-info/METADATA +0 -230
  102. braindecode-1.3.0.dev177069446.dist-info/RECORD +0 -124
  103. {braindecode-1.3.0.dev177069446.dist-info → braindecode-1.3.0.dev177628147.dist-info}/WHEEL +0 -0
  104. {braindecode-1.3.0.dev177069446.dist-info → braindecode-1.3.0.dev177628147.dist-info}/licenses/LICENSE.txt +0 -0
  105. {braindecode-1.3.0.dev177069446.dist-info → braindecode-1.3.0.dev177628147.dist-info}/licenses/NOTICE.txt +0 -0
  106. {braindecode-1.3.0.dev177069446.dist-info → braindecode-1.3.0.dev177628147.dist-info}/top_level.txt +0 -0
braindecode/regressor.py CHANGED
@@ -89,8 +89,7 @@ class EEGRegressor(_EEGNeuralNet, NeuralNetRegressor):
89
89
  return iterator
90
90
 
91
91
  def predict_proba(self, X):
92
- """Return the output of the module's forward method as a numpy.
93
-
92
+ """Return the output of the module's forward method as a numpy
94
93
  array. In case of cropped decoding returns averaged values for
95
94
  each trial.
96
95
 
@@ -117,15 +116,16 @@ class EEGRegressor(_EEGNeuralNet, NeuralNetRegressor):
117
116
  If this doesn't work with your data, you have to pass a
118
117
  ``Dataset`` that can deal with the data.
119
118
 
120
- Returns
121
- -------
122
- y_proba : numpy ndarray
123
-
124
119
  Warnings
125
120
  --------
126
121
  Regressors predict regression targets, so output of this method
127
122
  can't be interpreted as probabilities. We advise you to use
128
123
  `predict` method instead of `predict_proba`.
124
+
125
+ Returns
126
+ -------
127
+ y_proba : numpy ndarray
128
+
129
129
  """
130
130
  y_pred = super().predict_proba(X)
131
131
  # Normally, we have to average the predictions across crops/timesteps
@@ -139,24 +139,23 @@ class EEGRegressor(_EEGNeuralNet, NeuralNetRegressor):
139
139
  return y_pred
140
140
 
141
141
  def predict_trials(self, X, return_targets=True):
142
- """Create trialwise predictions and optionally also return trialwise.
143
-
142
+ """Create trialwise predictions and optionally also return trialwise
144
143
  labels from cropped dataset.
145
144
 
146
145
  Parameters
147
146
  ----------
148
- X : braindecode.datasets.BaseConcatDataset
147
+ X: braindecode.datasets.BaseConcatDataset
149
148
  A braindecode dataset to be predicted.
150
- return_targets : bool
149
+ return_targets: bool
151
150
  If True, additionally returns the trial targets.
152
151
 
153
152
  Returns
154
153
  -------
155
- trial_predictions : np.ndarray
154
+ trial_predictions: np.ndarray
156
155
  3-dimensional array (n_trials x n_classes x n_predictions), where
157
156
  the number of predictions depend on the chosen window size and the
158
157
  receptive field of the network.
159
- trial_labels : np.ndarray
158
+ trial_labels: np.ndarray
160
159
  2-dimensional array (n_trials x n_targets) where the number of
161
160
  targets depends on the decoding paradigm and can be either a single
162
161
  value, multiple values, or a sequence.
@@ -229,6 +228,10 @@ class EEGRegressor(_EEGNeuralNet, NeuralNetRegressor):
229
228
  y = np.array(y).reshape(-1, 1)
230
229
  super().fit(X=X, y=y, **kwargs)
231
230
 
232
- @property
233
- def mode(self):
234
- return "regression"
231
+ def _get_n_outputs(self, y, classes):
232
+ if y is None:
233
+ return None
234
+ if y.ndim == 1:
235
+ return 1
236
+ else:
237
+ return y.shape[-1]
@@ -190,7 +190,7 @@ class DistributedRelativePositioningSampler(DistributedRecordingSampler):
190
190
  self.tau_max = np.inf if tau_max is None else tau_max
191
191
  self.same_rec_neg = same_rec_neg
192
192
 
193
- self.n_examples = n_examples * self.n_recordings // self.info.shape[0]
193
+ self.n_examples = n_examples // self.info.shape[0] * self.n_recordings
194
194
  warnings.warn(
195
195
  f"Rank {dist.get_rank()} - Number of datasets: {self.n_recordings}"
196
196
  )
braindecode/util.py CHANGED
@@ -1,10 +1,10 @@
1
1
  # Authors: Robin Schirrmeister <robintibor@gmail.com>
2
2
  #
3
3
  # License: BSD (3-clause)
4
+
4
5
  import glob
5
6
  import os
6
7
  import random
7
- import re
8
8
  from warnings import warn
9
9
 
10
10
  import h5py
@@ -23,11 +23,11 @@ def set_random_seeds(seed, cuda, cudnn_benchmark=None):
23
23
 
24
24
  Parameters
25
25
  ----------
26
- seed : int
26
+ seed: int
27
27
  Random seed.
28
- cuda : bool
28
+ cuda: bool
29
29
  Whether to set cuda seed with torch.
30
- cudnn_benchmark : bool (default=None)
30
+ cudnn_benchmark: bool (default=None)
31
31
  Whether pytorch will use cudnn benchmark. When set to `None` it will not modify
32
32
  torch.backends.cudnn.benchmark (displays warning in the case of possible lack of
33
33
  reproducibility). When set to True, results may not be reproducible (no warning displayed).
@@ -71,17 +71,17 @@ def np_to_th(X, requires_grad=False, dtype=None, pin_memory=False, **tensor_kwar
71
71
 
72
72
  Parameters
73
73
  ----------
74
- X : ndarray or list or number
74
+ X: ndarray or list or number
75
75
  Input arrays
76
- requires_grad : bool
76
+ requires_grad: bool
77
77
  passed on to Variable constructor
78
- dtype : numpy dtype, optional
78
+ dtype: numpy dtype, optional
79
79
  var_kwargs:
80
80
  passed on to Variable constructor
81
81
 
82
82
  Returns
83
83
  -------
84
- var : `torch.Tensor`
84
+ var: `torch.Tensor`
85
85
  """
86
86
  if not hasattr(X, "__len__"):
87
87
  X = [X]
@@ -95,23 +95,21 @@ def np_to_th(X, requires_grad=False, dtype=None, pin_memory=False, **tensor_kwar
95
95
 
96
96
 
97
97
  def th_to_np(var: Tensor):
98
- """Convenience function to transform `torch.Tensor` to numpy.
99
-
98
+ """Convenience function to transform `torch.Tensor` to numpy
100
99
  array.
101
- Should work both for CPU and GPU.
102
- """
100
+
101
+ Should work both for CPU and GPU."""
103
102
  return var.cpu().data.numpy()
104
103
 
105
104
 
106
105
  def corr(a, b):
107
106
  """
108
- Computes correlation only between terms of a and terms of b, not within.
109
-
107
+ Computes correlation only between terms of a and terms of b, not within
110
108
  a and b.
111
109
 
112
110
  Parameters
113
111
  ----------
114
- a, b : 2darray, features x samples
112
+ a, b: 2darray, features x samples
115
113
 
116
114
  Returns
117
115
  -------
@@ -126,13 +124,12 @@ def corr(a, b):
126
124
 
127
125
  def cov(a, b):
128
126
  """
129
- Computes covariance only between terms of a and terms of b, not within.
130
-
127
+ Computes covariance only between terms of a and terms of b, not within
131
128
  a and b.
132
129
 
133
130
  Parameters
134
131
  ----------
135
- a, b : 2darray, features x samples
132
+ a, b: 2darray, features x samples
136
133
 
137
134
  Returns
138
135
  -------
@@ -159,24 +156,23 @@ def _cov_and_var_to_corr(this_cov, var_a, var_b):
159
156
 
160
157
  def wrap_reshape_apply_fn(stat_fn, a, b, axis_a, axis_b):
161
158
  """
162
- Reshape two nd-arrays into 2d-arrays, apply function and reshape.
163
-
159
+ Reshape two nd-arrays into 2d-arrays, apply function and reshape
164
160
  result back.
165
161
 
166
162
  Parameters
167
163
  ----------
168
- stat_fn : function
164
+ stat_fn: function
169
165
  Function to apply to 2d-arrays
170
- a : nd-array: nd-array
171
- b : nd-array
172
- axis_a : int or list of int
166
+ a: nd-array: nd-array
167
+ b: nd-array
168
+ axis_a: int or list of int
173
169
  sample axis
174
- axis_b : int or list of int
170
+ axis_b: int or list of int
175
171
  sample axis
176
172
 
177
173
  Returns
178
174
  -------
179
- result : nd-array
175
+ result: nd-array
180
176
  The result reshaped to remaining_dims_a + remaining_dims_b
181
177
  """
182
178
  if not hasattr(axis_a, "__len__"):
@@ -204,8 +200,7 @@ def wrap_reshape_apply_fn(stat_fn, a, b, axis_a, axis_b):
204
200
 
205
201
 
206
202
  def get_balanced_batches(n_trials, rng, shuffle, n_batches=None, batch_size=None):
207
- """Create indices for batches balanced in size.
208
-
203
+ """Create indices for batches balanced in size
209
204
  (batches will have maximum size difference of 1).
210
205
  Supply either batch size or number of batches. Resulting batches
211
206
  will not have the given batch size but rather the next largest batch size
@@ -223,7 +218,7 @@ def get_balanced_batches(n_trials, rng, shuffle, n_batches=None, batch_size=None
223
218
 
224
219
  Returns
225
220
  -------
226
- batches : list of list of int
221
+ batches: list of list of int
227
222
  Indices for each batch.
228
223
  """
229
224
  assert batch_size is not None or n_batches is not None
@@ -386,29 +381,24 @@ def update_estimator_docstring(base_class, docstring):
386
381
 
387
382
  def _update_moabb_docstring(base_class, docstring):
388
383
  base_doc = base_class.__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)
393
384
  out_docstring = base_doc + f"\n\n{docstring}"
394
385
  return out_docstring
395
386
 
396
387
 
397
388
  def read_all_file_names(directory, extension):
398
- """Read all files with specified extension from given path and sorts them.
399
-
389
+ """Read all files with specified extension from given path and sorts them
400
390
  based on a given sorting key.
401
391
 
402
392
  Parameters
403
393
  ----------
404
- directory : str
394
+ directory: str
405
395
  Parent directory to be searched for files of the specified type.
406
- extension : str
396
+ extension: str
407
397
  File extension, i.e. ".edf" or ".txt".
408
398
 
409
399
  Returns
410
400
  -------
411
- file_paths : list(str)
401
+ file_paths: list(str)
412
402
  List of all files found in (sub)directories of path.
413
403
  """
414
404
  assert extension.startswith(".")
braindecode/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "1.3.0.dev177069446"
1
+ __version__ = "1.3.0.dev177628147"
@@ -0,0 +1,202 @@
1
+ Metadata-Version: 2.4
2
+ Name: braindecode
3
+ Version: 1.3.0.dev177628147
4
+ Summary: Deep learning software to decode EEG, ECG or MEG signals
5
+ Author-email: Robin Tibor Schirrmeister <robintibor@gmail.com>, Bruno Aristimunha Pinto <b.aristimunha@gmail.com>, Alexandre Gramfort <agramfort@meta.com>
6
+ Maintainer-email: Alexandre Gramfort <agramfort@meta.com>, Bruno Aristimunha Pinto <b.aristimunha@gmail.com>, Robin Tibor Schirrmeister <robintibor@gmail.com>
7
+ License: BSD-3-Clause
8
+ Project-URL: homepage, https://braindecode.org
9
+ Project-URL: repository, https://github.com/braindecode/braindecode
10
+ Project-URL: documentation, https://braindecode.org/stable/index.html
11
+ Keywords: python,deep-learning,neuroscience,pytorch,meg,eeg,neuroimaging,electroencephalography,magnetoencephalography,electrocorticography,ecog,electroencephalogram
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Topic :: Software Development :: Build Tools
16
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Requires-Python: >=3.10
21
+ Description-Content-Type: text/x-rst
22
+ License-File: LICENSE.txt
23
+ License-File: NOTICE.txt
24
+ Requires-Dist: mne>=1.10.0
25
+ Requires-Dist: mne_bids>=0.16
26
+ Requires-Dist: numpy
27
+ Requires-Dist: pandas
28
+ Requires-Dist: scipy
29
+ Requires-Dist: matplotlib
30
+ Requires-Dist: h5py
31
+ Requires-Dist: skorch>=1.2.0
32
+ Requires-Dist: torch<3.0,>=2.0
33
+ Requires-Dist: torchaudio<3.0,>=2.0
34
+ Requires-Dist: einops
35
+ Requires-Dist: joblib
36
+ Requires-Dist: torchinfo~=1.8
37
+ Requires-Dist: wfdb
38
+ Requires-Dist: h5py
39
+ Requires-Dist: linear_attention_transformer
40
+ Requires-Dist: docstring_inheritance
41
+ Requires-Dist: rotary_embedding_torch
42
+ Provides-Extra: moabb
43
+ Requires-Dist: moabb>=1.2.0; extra == "moabb"
44
+ Provides-Extra: eegprep
45
+ Requires-Dist: eegprep[eeglabio]>=0.1.1; extra == "eegprep"
46
+ Provides-Extra: hub
47
+ Requires-Dist: huggingface_hub[torch]>=0.20.0; extra == "hub"
48
+ Requires-Dist: zarr<3.0,>=2.18; extra == "hub"
49
+ Provides-Extra: tests
50
+ Requires-Dist: pytest; extra == "tests"
51
+ Requires-Dist: pytest-cov; extra == "tests"
52
+ Requires-Dist: codecov; extra == "tests"
53
+ Requires-Dist: pytest_cases; extra == "tests"
54
+ Requires-Dist: mypy; extra == "tests"
55
+ Provides-Extra: docs
56
+ Requires-Dist: sphinx_gallery; extra == "docs"
57
+ Requires-Dist: sphinx_rtd_theme; extra == "docs"
58
+ Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
59
+ Requires-Dist: sphinx-autobuild; extra == "docs"
60
+ Requires-Dist: sphinxcontrib-bibtex; extra == "docs"
61
+ Requires-Dist: sphinx_sitemap; extra == "docs"
62
+ Requires-Dist: pydata_sphinx_theme; extra == "docs"
63
+ Requires-Dist: numpydoc; extra == "docs"
64
+ Requires-Dist: memory_profiler; extra == "docs"
65
+ Requires-Dist: pillow; extra == "docs"
66
+ Requires-Dist: ipython; extra == "docs"
67
+ Requires-Dist: sphinx_design; extra == "docs"
68
+ Requires-Dist: lightning; extra == "docs"
69
+ Requires-Dist: seaborn; extra == "docs"
70
+ Requires-Dist: pre-commit; extra == "docs"
71
+ Requires-Dist: openneuro-py; extra == "docs"
72
+ Requires-Dist: plotly; extra == "docs"
73
+ Provides-Extra: all
74
+ Requires-Dist: braindecode[moabb]; extra == "all"
75
+ Requires-Dist: braindecode[hub]; extra == "all"
76
+ Requires-Dist: braindecode[tests]; extra == "all"
77
+ Requires-Dist: braindecode[docs]; extra == "all"
78
+ Requires-Dist: braindecode[eegprep]; extra == "all"
79
+ Dynamic: license-file
80
+
81
+ .. image:: https://badges.gitter.im/braindecodechat/community.svg
82
+ :alt: Join the chat at https://gitter.im/braindecodechat/community
83
+ :target: https://gitter.im/braindecodechat/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
84
+
85
+ .. image:: https://github.com/braindecode/braindecode/workflows/docs/badge.svg
86
+ :target: https://github.com/braindecode/braindecode/actions
87
+
88
+ .. image:: https://circleci.com/gh/braindecode/braindecode.svg?style=svg
89
+ :target: https://circleci.com/gh/braindecode/braindecode
90
+ :alt: Doc build on CircleCI
91
+
92
+ .. image:: https://codecov.io/gh/braindecode/braindecode/branch/master/graph/badge.svg
93
+ :target: https://codecov.io/gh/braindecode/braindecode
94
+ :alt: Code Coverage
95
+
96
+ .. |Braindecode| image:: https://user-images.githubusercontent.com/42702466/177958779-b00628aa-9155-4c51-96d1-d8c345aff575.svg
97
+ .. _braindecode: braindecode.org/
98
+
99
+ Braindecode
100
+ ===========
101
+
102
+ Braindecode is an open-source Python toolbox for decoding raw electrophysiological brain
103
+ data with deep learning models. It includes dataset fetchers, data preprocessing and
104
+ visualization tools, as well as implementations of several deep learning
105
+ architectures and data augmentations for analysis of EEG, ECoG and MEG.
106
+
107
+ For neuroscientists who want to work with deep learning and
108
+ deep learning researchers who want to work with neurophysiological data.
109
+
110
+
111
+ Installation Braindecode
112
+ ========================
113
+
114
+ 1. Install pytorch from http://pytorch.org/ (you don't need to install torchvision).
115
+
116
+ 2. If you want to download EEG datasets from `MOABB <https://github.com/NeuroTechX/moabb>`_, install it:
117
+
118
+ .. code-block:: bash
119
+
120
+ pip install moabb
121
+
122
+ 3. Install latest release of braindecode via pip:
123
+
124
+ .. code-block:: bash
125
+
126
+ pip install braindecode
127
+
128
+ If you want to install the latest development version of braindecode, please refer to `contributing page <https://github.com/braindecode/braindecode/blob/master/CONTRIBUTING.md>`__
129
+
130
+
131
+ Documentation
132
+ =============
133
+
134
+ Documentation is online under https://braindecode.org, both in the stable and dev versions.
135
+
136
+
137
+ Contributing to Braindecode
138
+ ===========================
139
+
140
+ Guidelines for contributing to the library can be found on the braindecode github:
141
+
142
+ https://github.com/braindecode/braindecode/blob/master/CONTRIBUTING.md
143
+
144
+ Braindecode chat
145
+ ================
146
+
147
+ https://gitter.im/braindecodechat/community
148
+
149
+ Citing
150
+ ======
151
+
152
+ If you use this code in a scientific publication, please cite us as:
153
+
154
+ .. code-block:: bibtex
155
+
156
+ @article {HBM:HBM23730,
157
+ author = {Schirrmeister, Robin Tibor and Springenberg, Jost Tobias and Fiederer,
158
+ Lukas Dominique Josef and Glasstetter, Martin and Eggensperger, Katharina and Tangermann, Michael and
159
+ Hutter, Frank and Burgard, Wolfram and Ball, Tonio},
160
+ title = {Deep learning with convolutional neural networks for EEG decoding and visualization},
161
+ journal = {Human Brain Mapping},
162
+ issn = {1097-0193},
163
+ url = {http://dx.doi.org/10.1002/hbm.23730},
164
+ doi = {10.1002/hbm.23730},
165
+ month = {aug},
166
+ year = {2017},
167
+ keywords = {electroencephalography, EEG analysis, machine learning, end-to-end learning, brain–machine interface,
168
+ brain–computer interface, model interpretability, brain mapping},
169
+ }
170
+
171
+ as well as the `MNE-Python <https://mne.tools>`_ software that is used by braindecode:
172
+
173
+ .. code-block:: bibtex
174
+
175
+ @article{10.3389/fnins.2013.00267,
176
+ author={Gramfort, Alexandre and Luessi, Martin and Larson, Eric and Engemann, Denis and Strohmeier, Daniel and Brodbeck, Christian and Goj, Roman and Jas, Mainak and Brooks, Teon and Parkkonen, Lauri and Hämäläinen, Matti},
177
+ title={{MEG and EEG data analysis with MNE-Python}},
178
+ journal={Frontiers in Neuroscience},
179
+ volume={7},
180
+ pages={267},
181
+ year={2013},
182
+ url={https://www.frontiersin.org/article/10.3389/fnins.2013.00267},
183
+ doi={10.3389/fnins.2013.00267},
184
+ issn={1662-453X},
185
+ }
186
+
187
+
188
+
189
+
190
+ Licensing
191
+ ^^^^^^^^^
192
+
193
+ This project is primarily licensed under the BSD-3-Clause License.
194
+
195
+ Additional Components
196
+ ~~~~~~~~~~~~~~~~~~~~~
197
+
198
+ Some components within this repository are licensed under the Creative Commons Attribution-NonCommercial 4.0 International
199
+ License.
200
+
201
+ Please refer to the ``LICENSE`` and ``NOTICE`` files for more detailed
202
+ information.
@@ -0,0 +1,114 @@
1
+ braindecode/__init__.py,sha256=Ac3LEEyIHWFY_fFh3eAY1GZUqXcUxVSJwOSUCwGEDvQ,182
2
+ braindecode/classifier.py,sha256=k9vSCtfQbld0YVleDi5rrrmk6k_k5JYEPPBYcNxYjZ8,9807
3
+ braindecode/eegneuralnet.py,sha256=U6kRdT2u8A2Ca0axMTR8IAESBsvgjLMusAbYappKAOk,15368
4
+ braindecode/regressor.py,sha256=VLfrpiXklwI4onkwue3QmzlBWcvspu0tlrLo9RT1Oiw,9375
5
+ braindecode/util.py,sha256=J-tBcDJNlMTIFW2mfOy6Ko0nsgdP4obRoEVDeg2rFH0,12686
6
+ braindecode/version.py,sha256=HXuZJZzrSYhRLiMY4KgWIRRhcDrKTqv5tu9gvlpw1d0,35
7
+ braindecode/augmentation/__init__.py,sha256=LG7ONqCufYAF9NZt8POIp10lYXb8iSueYkF-CWGK2Ls,1001
8
+ braindecode/augmentation/base.py,sha256=nK90HWzNwroDCC61e3bZfIsCdEHmGstJliS-TB6wrK0,7327
9
+ braindecode/augmentation/functional.py,sha256=61nzqM8b-cQ4sESYBtdcSxVcfvkTahZWTFridkH9_Lk,43983
10
+ braindecode/augmentation/transforms.py,sha256=6aMwV8CGWs2TcN1FD98dAKE2h2QDQFqGS9gSU6i45oc,47070
11
+ braindecode/datasets/__init__.py,sha256=ilreHRveTzExYEEyc2WXarq2u9uT7EE8EAoSl2OOo2M,996
12
+ braindecode/datasets/base.py,sha256=q2pO6zXL7se8bMUIAfnu6PrVwwKH2tNzn7TXwNU8fvw,31178
13
+ braindecode/datasets/bbci.py,sha256=BC9o1thEyYBREAo930O7zZz3xZB-l4Odt5j8E_1huXI,19277
14
+ braindecode/datasets/bcicomp.py,sha256=WwSFfP9whc7Vw5-Jt9vQAHKnRUB5TUe7w945748uGjU,7551
15
+ braindecode/datasets/bids.py,sha256=BxiyGnZuhC56ITUQgJuFv62lgw0LimsSIMRVySgje1A,8843
16
+ braindecode/datasets/experimental.py,sha256=ij7tM_7bXFlvAh3sVVRhoh1CsF9OhMxQC6s4NZyinK8,8515
17
+ braindecode/datasets/hub.py,sha256=NSNoOuq9Z7LKv9sG4KK5vuiIOFLPq6194YiHdc4J70Q,33389
18
+ braindecode/datasets/hub_validation.py,sha256=lHynMzSuhThau0TXUn9JAmUDhpwWMan5imwNKiLkKrI,3433
19
+ braindecode/datasets/mne.py,sha256=5l25ZSnYUX5-jnl4ArwKhVqqm2R852J2T9QdWiJ4npE,6110
20
+ braindecode/datasets/moabb.py,sha256=8U5ZznSlI5hnzZzo2QF3ZQGM1waZeGM5jGRVun_Rs6Y,7328
21
+ braindecode/datasets/nmt.py,sha256=vzmO1Ks8oMO7uwXhbysCelyuczSJAFz9QdeXyASshVw,10428
22
+ braindecode/datasets/registry.py,sha256=Sa28uzH3dUzeFWsttFXwI5GW7SU_1Tjl_j2ayoj-RAM,2771
23
+ braindecode/datasets/sleep_physio_challe_18.py,sha256=rpgBtxIsq3qnk7L4ePtCd5_q5Bwr_ZCW3x9izsraoXk,15425
24
+ braindecode/datasets/sleep_physionet.py,sha256=N2KxENTuJb9L1sukPAliAeUD7qxgRrQpQNs6PyaMU6M,4085
25
+ braindecode/datasets/tuh.py,sha256=gdYWzY4F1wKsSSzUaKSRk9q6PPELb0byrgelCt0W9_A,22865
26
+ braindecode/datasets/xy.py,sha256=o6VFUalpgPHp6_ZwwbfV6H7AyCoQST7ugMOYltXqvmI,2984
27
+ braindecode/datautil/__init__.py,sha256=3_RbGj8UqadRKj01huguNKKfj-ADMnFTavjUExxPdBw,1957
28
+ braindecode/datautil/channel_utils.py,sha256=uexSn78BB7F92L4z1F1mfXUR75BUJUNfezyCdD7RmzY,3575
29
+ braindecode/datautil/hub_formats.py,sha256=Qb-e39jkhWsZtXGIKcTPVzt28Lv8m_uRdqvqcJfIwco,5692
30
+ braindecode/datautil/serialization.py,sha256=VJLxQv50-fFqhLKyKlyE8qy_mxnEOMmTq_B9gTodza8,13098
31
+ braindecode/datautil/util.py,sha256=ZfDoxLieKsgI8xcWQqebV-vJ5pJYRvRRHkEwhwpgoKU,674
32
+ braindecode/functional/__init__.py,sha256=JPUDFeKtfogEzfrwPaZRBmxexPjBw7AglYMlImaAnWc,413
33
+ braindecode/functional/functions.py,sha256=x3_UGovZ9HPnSAL2DtMwHsGm6MdNm0CdHd3-pzHzEto,8649
34
+ braindecode/functional/initialization.py,sha256=f-4jIS9QY-YD-3R7N77UbBJh8GcuDvVUzn6Ad6Gx8LE,1382
35
+ braindecode/models/__init__.py,sha256=_NHRWp4VAmNwXLogHCVYBoJUNb-NPp2eNyAgtNY6MoI,2812
36
+ braindecode/models/atcnet.py,sha256=DtAGN9GV_lM7syXhb3pZlwgOWzo8dpF-j_yuXlL4TIk,32243
37
+ braindecode/models/attentionbasenet.py,sha256=bgc6_7jDT_fnfyCtPhI4i6H7Zornxe46-bMoINLl6YE,30416
38
+ braindecode/models/attn_sleep.py,sha256=5mzYfnpaF1-C8WSV3BOq_HafyJxH69KkOF-KPbenqas,17882
39
+ braindecode/models/base.py,sha256=iufKlZf_Oe7wPkkOvfNPOn387E_np6B9YLeVLHTlRHk,20191
40
+ braindecode/models/bendr.py,sha256=MZQdYFERVeBJnynEXDlCLdn_I0mJtgzzFuMhCXkbMkg,21591
41
+ braindecode/models/biot.py,sha256=LpJ8tXqQL2Zh_vcQnpUHEpAGQrPHtn2cBSTUPFCW8jQ,17546
42
+ braindecode/models/contrawr.py,sha256=wXEr1HULWH-qdVXyt2lhyYajxS_AKv9kGZboJbHSsxo,10076
43
+ braindecode/models/ctnet.py,sha256=T03YsDkALys6LnncYrpsrNZABFQxTyFS8c8vfSJ-4_I,17384
44
+ braindecode/models/deep4.py,sha256=-s-R3H7so2xlSiPsU226eSwscv1X9xJMYLm3LhZ3mSU,14645
45
+ braindecode/models/deepsleepnet.py,sha256=oc1Df7e5cWsxYlLGcI467ZpyIVWhuVoAiSBrJjYVGHo,15268
46
+ braindecode/models/eegconformer.py,sha256=z8oSuo1Dv-MKGyxCFQVxQa3sbeku8v8u66c3Qjig38c,17429
47
+ braindecode/models/eeginception_erp.py,sha256=aAjpweNixFgOSL47r-IjHFZujJje8a7TWudtbYdY98M,16410
48
+ braindecode/models/eeginception_mi.py,sha256=VoWtsaWj1xQ4FlrvCbnPvo8eosufYUmTrL4uvFtqKcg,12456
49
+ braindecode/models/eegitnet.py,sha256=AmgxYmzHd4aIz14Oh4tr9h_OFpwZxZs2CBz_VbDyETk,9886
50
+ braindecode/models/eegminer.py,sha256=JZINTEIbEk6F48REdO8qGghaw57wa7GzZZ1o1mantyk,9911
51
+ braindecode/models/eegnet.py,sha256=qmxQZa-owqEuha7iwOAdPQU29DoLpEyNjH-oouddWLc,13684
52
+ braindecode/models/eegnex.py,sha256=eahHolFl15LwNWeC5qjQqUGqURibQZIV425rI1p-dG8,13604
53
+ braindecode/models/eegsimpleconv.py,sha256=6V5ZQNWijmd3-2wv7lJB_HGBS3wHWWVrKoNIeWTXu-w,7300
54
+ braindecode/models/eegsym.py,sha256=TCqTYGahUCDmF63vGl3yVIRq6zFdoZZvKzd-hli4-Jk,34590
55
+ braindecode/models/eegtcnet.py,sha256=09CuM6nYaMZgBpw6-LvYljJXxJrC09Cz1PzVIRqxzYA,10896
56
+ braindecode/models/fbcnet.py,sha256=OYZHQukjjG4m8FMoXb5KvzJbcYs3YxTz8mGz1rUXcac,7704
57
+ braindecode/models/fblightconvnet.py,sha256=CB_IrJPnrUQOB64dS1SpgmwsiSBrHY6edVeBbSUbWec,11099
58
+ braindecode/models/fbmsnet.py,sha256=HJimrZQ764X4iM7hhiluLc31HJVwCEoO4tifpHNiUUs,12347
59
+ braindecode/models/hybrid.py,sha256=hA8jwD3_3LL71BxUjRM1dkhqlHU9E9hjuDokh-jBq-4,4024
60
+ braindecode/models/ifnet.py,sha256=FBga7U4S8VXviu58-vs8my-7TyCq8dAHnmLKzXmAmFs,15195
61
+ braindecode/models/labram.py,sha256=CNQhKvFS-Ab1yzEiqK4JFjb2XG8bQLjh1XrGK5nhT7c,46715
62
+ braindecode/models/luna.py,sha256=3wTrE5c8dPeYQ9C3RO0t8f-2E9OoZgHIZeGYsx7QFV4,30204
63
+ braindecode/models/medformer.py,sha256=5JKKI8z2XpORjGw0tCu-eO_p6QiJ6xens-9fSq62-U8,30638
64
+ braindecode/models/msvtnet.py,sha256=-GEBeeGhAitletjGim-79IfuN2aSg6uc-30SgUS0fq0,12729
65
+ braindecode/models/patchedtransformer.py,sha256=G-a4uxbbv8z7OvdqX51J--jLGBpyTClrTWEzthChiLs,23443
66
+ braindecode/models/sccnet.py,sha256=C7vdwIR5cI6wJCl5f8TnGQG6qinq21y4HG6l-D5AwbY,11971
67
+ braindecode/models/shallow_fbcsp.py,sha256=7U07DJBrm2JHV8v5ja-xuE5-IH5tfmryhJtrfO1n4jk,7531
68
+ braindecode/models/signal_jepa.py,sha256=eYYzpRIUaJZ-dCV9ag20gNZxmduVey1EfhP-a4_jUe8,41369
69
+ braindecode/models/sinc_shallow.py,sha256=RqcvnVgk9bo5WF27XW07-IhNI03rBkhAEco8txQO1Z4,11944
70
+ braindecode/models/sleep_stager_blanco_2020.py,sha256=vXulnDYutEFLM0UPXyAI0YIj5QImUMVEmYZb78j34H8,6034
71
+ braindecode/models/sleep_stager_chambon_2018.py,sha256=8w8IR2PsfG0jSc3o0YVopgHpOvCHNIuMi7-QRJOYEW4,5245
72
+ braindecode/models/sparcnet.py,sha256=MG1OB91guI7ssKRk8GvWlzUvaxo_otaYnbEGzNUZVyg,13973
73
+ braindecode/models/sstdpn.py,sha256=wJv-UYP1q8cMGp2wU1efzIZiigRmkJ8uY22rNB2D7Wc,35077
74
+ braindecode/models/summary.csv,sha256=7BvOTnQ2QHtwJ4jMj--LbnfRIgbpVgYR-g9b_WOsVEQ,7703
75
+ braindecode/models/syncnet.py,sha256=yepqfW_fx4Vi72jee-WTBZVwMFRMIhwDAfrDR7Da9iw,8399
76
+ braindecode/models/tcn.py,sha256=QuiLF_2oGuD9oXWFQtAaI-SjdEMlCUQeNI6DTIMuJ70,8217
77
+ braindecode/models/tidnet.py,sha256=HSUL1al6gaRbJ-BRYAAs4KDvLuKEvh0NnBfAsPeWMpM,11837
78
+ braindecode/models/tsinception.py,sha256=nnQxzpqRy9FPuN5xgh9fNQ386VbreQ_nZBSFNkSfal0,10356
79
+ braindecode/models/usleep.py,sha256=oZv2Z78d2jfyyh-LbRBSgGfWjP8YugcXEHvQAENM_Q8,17296
80
+ braindecode/models/util.py,sha256=uIT_RO3BnGZtujfpVq1JplUt5ohMk2nSG_5u-RYAMQc,8516
81
+ braindecode/modules/__init__.py,sha256=PD2LpeSHWW_MgEef7-G8ief5gheGObzsIoacchxWuyA,1756
82
+ braindecode/modules/activation.py,sha256=lTO2IjZWBDeXZ4ZVDgLmTDmxHdqyAny3Fsy07HY9tmQ,1466
83
+ braindecode/modules/attention.py,sha256=N-GYLyDV5crKFg08x-lkosMjaOTJv8lk_2p1Jkh_PdU,24142
84
+ braindecode/modules/blocks.py,sha256=M_jWtr9kNOP-hZVVzb9hj-jsSV1mvv-eX1qtV5MacEU,3617
85
+ braindecode/modules/convolution.py,sha256=gZMMOa-2gy1nfduA_j2ezgdIdq5Bi2PtonNomWA4D8k,8481
86
+ braindecode/modules/filter.py,sha256=ZHXs_5gjrCQk_csTy4BZyhxRX5SFkhmyCGHDnbM7HXA,24866
87
+ braindecode/modules/layers.py,sha256=LqkXuSaSPKD9qWBy7jYLJ9lBSHObYsmwfgGEFFZ6xq0,3659
88
+ braindecode/modules/linear.py,sha256=pNhSUU0u-IGEUCjAfEDq_TJWnIJMWuOk7Y5L-7I8Meg,1702
89
+ braindecode/modules/parametrization.py,sha256=sTvV21-sdpqpiY2PzwDebi7SeEvkFw8yDgA6OqJDo34,1310
90
+ braindecode/modules/stats.py,sha256=ETqZH6PPyYCss2PKBDNrO4uUeijR4bxvjCQCXjNJkH4,2398
91
+ braindecode/modules/util.py,sha256=tVXEhzeTsYrr_wZ5CiXaq3VYGtC5TmGEEW2hMYjTQAE,2609
92
+ braindecode/modules/wrapper.py,sha256=Z-aZ4wxA0psYefMOfj03r7D1XjD4az6GpZpaQoDPJv0,2421
93
+ braindecode/preprocessing/__init__.py,sha256=NCKhT4-_-DMBFpppEg2VguCe4x7ZW-gInWn60G6hOSs,9643
94
+ braindecode/preprocessing/eegprep_preprocess.py,sha256=KrPoc6cD_xj_dMWT66AkXuycroPDlliMrgiD9qdGhkw,58236
95
+ braindecode/preprocessing/mne_preprocess.py,sha256=8JUOTKvBaEkQERPnVAX1WZHwSFAgCxIhQq1FuQLmQmQ,8166
96
+ braindecode/preprocessing/preprocess.py,sha256=54LCH89z2XjSjCMa6SSLnkD6MWwEMQAdV--jf4Hwsn4,20946
97
+ braindecode/preprocessing/util.py,sha256=ivODABSuy-SKvPMa2U6W3uWM4cwmSg-7jSKqIRxBBw4,5925
98
+ braindecode/preprocessing/windowers.py,sha256=vZJtoh4vFxlbId21Ej6RKNMZ8IvUkDxyRgo4HfP99Vw,36905
99
+ braindecode/samplers/__init__.py,sha256=TLuO6gXv2WioJdX671MI_CHVSsOfbjnly1Xv9K3_WdA,452
100
+ braindecode/samplers/base.py,sha256=PTa4gGAKXH1Tnx4vBXBAb43x7wQKVvqK1mlM_zE3yY4,15133
101
+ braindecode/samplers/ssl.py,sha256=C-FKopnbncN_-spQPCrgljY5Qds4fgTLr2TG3s_-QqU,9146
102
+ braindecode/training/__init__.py,sha256=sxtfI6MgxX3aP03EFc0wJYA37uULoL9SQyUao1Oxyn0,523
103
+ braindecode/training/callbacks.py,sha256=LqXqzJd6s3w0pvAKy9TEVTxWwVRyWNEu2uyWVsvb9RQ,839
104
+ braindecode/training/losses.py,sha256=EyVVZE_028G6WwrAtzLbrRfDLgsoKwLLhqIkOYBXNL4,3551
105
+ braindecode/training/scoring.py,sha256=WRkwqbitA3m_dzRnGp2ZIZPge5Nhx9gAEQhIHzeH4eU,18716
106
+ braindecode/visualization/__init__.py,sha256=4EER_xHqZIDzEvmgUEm7K1bgNKpyZAIClR9ZCkMuY4M,240
107
+ braindecode/visualization/confusion_matrices.py,sha256=qIWMLEHow5CJ7PhGggD8mnD55Le6xhma9HSzt4R33fc,9509
108
+ braindecode/visualization/gradients.py,sha256=KZo-GA0uwiwty2_94j2IjmCR2SKcfPb1Bi3sQq7vpTk,2170
109
+ braindecode-1.3.0.dev177628147.dist-info/licenses/LICENSE.txt,sha256=7rg7k6hyj8m9whQ7dpKbqnCssoOEx_Mbtqb4uSOjljE,1525
110
+ braindecode-1.3.0.dev177628147.dist-info/licenses/NOTICE.txt,sha256=sOxuTbalPxTM8H6VqtvGbXCt_BoOF7JevEYG_knqbm4,620
111
+ braindecode-1.3.0.dev177628147.dist-info/METADATA,sha256=hRhQGYGV7LlO_S_qziW44AjXgGoMcf8AYW-SHb1syAk,7660
112
+ braindecode-1.3.0.dev177628147.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
113
+ braindecode-1.3.0.dev177628147.dist-info/top_level.txt,sha256=pHsWQmSy0uhIez62-HA9j0iaXKvSbUL39ifFRkFnChA,12
114
+ braindecode-1.3.0.dev177628147.dist-info/RECORD,,
@@ -1,54 +0,0 @@
1
- # mypy: ignore-errors
2
- """
3
- BIDS (Brain Imaging Data Structure) integration for braindecode.
4
-
5
- This subpackage provides:
6
- - BIDS dataset loading (BIDSDataset, BIDSEpochsDataset)
7
- - BIDS-like format utilities for Hub integration
8
- - Hugging Face Hub push/pull functionality
9
- - Validation utilities for Hub operations
10
-
11
- More information on BIDS can be found at https://bids.neuroimaging.io
12
- """
13
-
14
- # Authors: Bruno Aristimunha <b.aristimunha@gmail.com>
15
- # Pierre Guetschel <pierre.guetschel@gmail.com>
16
- # Kuntal Kokate
17
- #
18
- # License: BSD (3-clause)
19
-
20
- from typing import TYPE_CHECKING
21
-
22
- # Only import hub at init level (needed by base.py)
23
- # Other imports are deferred to avoid circular imports
24
- from .hub import HubDatasetMixin
25
-
26
- # For static type checkers (mypy), provide explicit imports
27
- if TYPE_CHECKING:
28
- from .datasets import BIDSDataset, BIDSEpochsDataset
29
- from .iterable import BIDSIterableDataset
30
-
31
-
32
- def __getattr__(name: str):
33
- """Lazy imports to avoid circular dependencies."""
34
- if name in ("BIDSDataset", "BIDSEpochsDataset"):
35
- from .datasets import BIDSDataset, BIDSEpochsDataset
36
-
37
- return {"BIDSDataset": BIDSDataset, "BIDSEpochsDataset": BIDSEpochsDataset}[
38
- name
39
- ]
40
- elif name == "BIDSIterableDataset":
41
- from .iterable import BIDSIterableDataset
42
-
43
- return BIDSIterableDataset
44
- raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
45
-
46
-
47
- __all__ = [
48
- # Dataset classes
49
- "BIDSDataset",
50
- "BIDSEpochsDataset",
51
- "BIDSIterableDataset",
52
- # Hub integration
53
- "HubDatasetMixin",
54
- ]