Braindecode 1.5.0.dev997__tar.gz → 1.5.0.dev998__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 (173) hide show
  1. {braindecode-1.5.0.dev997/braindecode.egg-info → braindecode-1.5.0.dev998}/PKG-INFO +2 -5
  2. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/datasets/sleep_physionet.py +1 -15
  3. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/__init__.py +0 -2
  4. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/summary.csv +0 -1
  5. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/util.py +0 -12
  6. braindecode-1.5.0.dev998/braindecode/version.py +1 -0
  7. braindecode-1.5.0.dev998/braindecode/visualization/__init__.py +8 -0
  8. braindecode-1.5.0.dev998/braindecode/visualization/gradients.py +62 -0
  9. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998/braindecode.egg-info}/PKG-INFO +2 -5
  10. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode.egg-info/SOURCES.txt +1 -6
  11. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode.egg-info/requires.txt +1 -5
  12. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/docs/api.rst +4 -96
  13. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/docs/whats_new.rst +0 -38
  14. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/pyproject.toml +1 -3
  15. braindecode-1.5.0.dev997/braindecode/models/emg2qwerty.py +0 -714
  16. braindecode-1.5.0.dev997/braindecode/version.py +0 -1
  17. braindecode-1.5.0.dev997/braindecode/visualization/__init__.py +0 -45
  18. braindecode-1.5.0.dev997/braindecode/visualization/attribution.py +0 -152
  19. braindecode-1.5.0.dev997/braindecode/visualization/frequency.py +0 -89
  20. braindecode-1.5.0.dev997/braindecode/visualization/metrics.py +0 -414
  21. braindecode-1.5.0.dev997/braindecode/visualization/sanity.py +0 -117
  22. braindecode-1.5.0.dev997/braindecode/visualization/topology.py +0 -64
  23. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/LICENSE.txt +0 -0
  24. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/MANIFEST.in +0 -0
  25. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/NOTICE.txt +0 -0
  26. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/README.rst +0 -0
  27. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/__init__.py +0 -0
  28. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/augmentation/__init__.py +0 -0
  29. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/augmentation/base.py +0 -0
  30. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/augmentation/functional.py +0 -0
  31. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/augmentation/transforms.py +0 -0
  32. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/classifier.py +0 -0
  33. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/datasets/__init__.py +0 -0
  34. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/datasets/base.py +0 -0
  35. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/datasets/bbci.py +0 -0
  36. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/datasets/bcicomp.py +0 -0
  37. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/datasets/bids/__init__.py +0 -0
  38. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/datasets/bids/datasets.py +0 -0
  39. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/datasets/bids/format.py +0 -0
  40. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/datasets/bids/hub.py +0 -0
  41. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/datasets/bids/hub_format.py +0 -0
  42. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/datasets/bids/hub_io.py +0 -0
  43. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/datasets/bids/hub_validation.py +0 -0
  44. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/datasets/bids/iterable.py +0 -0
  45. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/datasets/chb_mit.py +0 -0
  46. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/datasets/mne.py +0 -0
  47. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/datasets/moabb.py +0 -0
  48. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/datasets/nmt.py +0 -0
  49. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/datasets/registry.py +0 -0
  50. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/datasets/siena.py +0 -0
  51. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/datasets/sleep_physio_challe_18.py +0 -0
  52. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/datasets/tuh.py +0 -0
  53. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/datasets/utils.py +0 -0
  54. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/datasets/xy.py +0 -0
  55. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/datautil/__init__.py +0 -0
  56. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/datautil/channel_utils.py +0 -0
  57. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/datautil/hub_formats.py +0 -0
  58. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/datautil/serialization.py +0 -0
  59. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/datautil/util.py +0 -0
  60. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/eegneuralnet.py +0 -0
  61. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/functional/__init__.py +0 -0
  62. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/functional/functions.py +0 -0
  63. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/functional/initialization.py +0 -0
  64. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/atcnet.py +0 -0
  65. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/attentionbasenet.py +0 -0
  66. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/attn_sleep.py +0 -0
  67. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/base.py +0 -0
  68. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/bendr.py +0 -0
  69. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/biot.py +0 -0
  70. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/brainmodule.py +0 -0
  71. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/cbramod.py +0 -0
  72. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/codebrain.py +0 -0
  73. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/config.py +0 -0
  74. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/contrawr.py +0 -0
  75. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/ctnet.py +0 -0
  76. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/deep4.py +0 -0
  77. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/deepsleepnet.py +0 -0
  78. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/dgcnn.py +0 -0
  79. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/eegconformer.py +0 -0
  80. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/eeginception_erp.py +0 -0
  81. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/eeginception_mi.py +0 -0
  82. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/eegitnet.py +0 -0
  83. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/eegminer.py +0 -0
  84. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/eegnet.py +0 -0
  85. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/eegnex.py +0 -0
  86. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/eegpt.py +0 -0
  87. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/eegsimpleconv.py +0 -0
  88. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/eegsym.py +0 -0
  89. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/eegtcnet.py +0 -0
  90. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/fbcnet.py +0 -0
  91. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/fblightconvnet.py +0 -0
  92. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/fbmsnet.py +0 -0
  93. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/hybrid.py +0 -0
  94. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/ifnet.py +0 -0
  95. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/interpolated.py +0 -0
  96. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/labram.py +0 -0
  97. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/luna.py +0 -0
  98. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/medformer.py +0 -0
  99. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/meta_neuromotor.py +0 -0
  100. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/msvtnet.py +0 -0
  101. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/patchedtransformer.py +0 -0
  102. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/reve.py +0 -0
  103. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/sccnet.py +0 -0
  104. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/shallow_fbcsp.py +0 -0
  105. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/signal_jepa.py +0 -0
  106. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/sinc_shallow.py +0 -0
  107. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/sleep_stager_blanco_2020.py +0 -0
  108. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/sleep_stager_chambon_2018.py +0 -0
  109. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/sparcnet.py +0 -0
  110. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/sstdpn.py +0 -0
  111. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/syncnet.py +0 -0
  112. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/tcn.py +0 -0
  113. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/tidnet.py +0 -0
  114. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/tsinception.py +0 -0
  115. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/models/usleep.py +0 -0
  116. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/modules/__init__.py +0 -0
  117. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/modules/activation.py +0 -0
  118. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/modules/attention.py +0 -0
  119. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/modules/blocks.py +0 -0
  120. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/modules/convolution.py +0 -0
  121. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/modules/filter.py +0 -0
  122. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/modules/interpolation.py +0 -0
  123. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/modules/layers.py +0 -0
  124. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/modules/linear.py +0 -0
  125. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/modules/parametrization.py +0 -0
  126. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/modules/stats.py +0 -0
  127. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/modules/util.py +0 -0
  128. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/modules/wrapper.py +0 -0
  129. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/preprocessing/__init__.py +0 -0
  130. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/preprocessing/eegprep_preprocess.py +0 -0
  131. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/preprocessing/mne_preprocess.py +0 -0
  132. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/preprocessing/preprocess.py +0 -0
  133. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/preprocessing/util.py +0 -0
  134. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/preprocessing/windowers.py +0 -0
  135. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/regressor.py +0 -0
  136. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/samplers/__init__.py +0 -0
  137. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/samplers/base.py +0 -0
  138. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/samplers/ssl.py +0 -0
  139. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/training/__init__.py +0 -0
  140. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/training/callbacks.py +0 -0
  141. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/training/losses.py +0 -0
  142. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/training/scoring.py +0 -0
  143. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/util.py +0 -0
  144. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode/visualization/confusion_matrices.py +0 -0
  145. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode.egg-info/dependency_links.txt +0 -0
  146. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/braindecode.egg-info/top_level.txt +0 -0
  147. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/docs/Makefile +0 -0
  148. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/docs/_templates/autosummary/class.rst +0 -0
  149. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/docs/_templates/autosummary/class_in_subdir.rst +0 -0
  150. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/docs/_templates/autosummary/function.rst +0 -0
  151. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/docs/_templates/autosummary/function_in_subdir.rst +0 -0
  152. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/docs/cite.rst +0 -0
  153. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/docs/conf.py +0 -0
  154. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/docs/help.rst +0 -0
  155. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/docs/index.rst +0 -0
  156. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/docs/install/install.rst +0 -0
  157. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/docs/install/install_pip.rst +0 -0
  158. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/docs/install/install_source.rst +0 -0
  159. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/docs/models/categorization/attention.rst +0 -0
  160. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/docs/models/categorization/channel.rst +0 -0
  161. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/docs/models/categorization/convolution.rst +0 -0
  162. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/docs/models/categorization/filterbank.rst +0 -0
  163. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/docs/models/categorization/gnn.rst +0 -0
  164. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/docs/models/categorization/interpretable.rst +0 -0
  165. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/docs/models/categorization/lbm.rst +0 -0
  166. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/docs/models/categorization/recurrent.rst +0 -0
  167. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/docs/models/categorization/spd.rst +0 -0
  168. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/docs/models/models.rst +0 -0
  169. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/docs/models/models_categorization.rst +0 -0
  170. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/docs/models/models_table.rst +0 -0
  171. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/docs/models/models_visualization.rst +0 -0
  172. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/docs/sg_execution_times.rst +0 -0
  173. {braindecode-1.5.0.dev997 → braindecode-1.5.0.dev998}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: braindecode
3
- Version: 1.5.0.dev997
3
+ Version: 1.5.0.dev998
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>
@@ -43,8 +43,6 @@ Requires-Dist: eegprep[eeglabio]>=0.2.23; extra == "eegprep"
43
43
  Provides-Extra: hub
44
44
  Requires-Dist: huggingface_hub[torch]>=0.20.0; extra == "hub"
45
45
  Requires-Dist: zarr>=3.0; extra == "hub"
46
- Provides-Extra: viz
47
- Requires-Dist: captum>=0.7.0; extra == "viz"
48
46
  Provides-Extra: tests
49
47
  Requires-Dist: pytest; extra == "tests"
50
48
  Requires-Dist: pytest-cov; extra == "tests"
@@ -72,7 +70,7 @@ Requires-Dist: sphinx_design; extra == "docs"
72
70
  Requires-Dist: lightning; extra == "docs"
73
71
  Requires-Dist: seaborn; extra == "docs"
74
72
  Requires-Dist: pre-commit; extra == "docs"
75
- Requires-Dist: openneuro-py>=2026.4.0; extra == "docs"
73
+ Requires-Dist: openneuro-py; extra == "docs"
76
74
  Requires-Dist: plotly; extra == "docs"
77
75
  Requires-Dist: shap; extra == "docs"
78
76
  Requires-Dist: nbformat; extra == "docs"
@@ -84,7 +82,6 @@ Requires-Dist: braindecode[docs]; extra == "all"
84
82
  Requires-Dist: braindecode[hub]; extra == "all"
85
83
  Requires-Dist: braindecode[eegprep]; extra == "all"
86
84
  Requires-Dist: braindecode[typing]; extra == "all"
87
- Requires-Dist: braindecode[viz]; extra == "all"
88
85
  Dynamic: license-file
89
86
 
90
87
  .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.17699192.svg
@@ -6,12 +6,10 @@
6
6
  from __future__ import annotations
7
7
 
8
8
  import os
9
- import time
10
9
 
11
10
  import mne
12
11
  import numpy as np
13
12
  import pandas as pd
14
- import requests
15
13
  from mne.datasets.sleep_physionet.age import fetch_data
16
14
 
17
15
  from .base import BaseConcatDataset, RawDataset
@@ -61,19 +59,7 @@ class SleepPhysionet(BaseConcatDataset):
61
59
  if recording_ids is None:
62
60
  recording_ids = [1, 2]
63
61
 
64
- max_attempts = 5
65
- retry_delay_s = 10
66
-
67
- for attempt in range(max_attempts):
68
- try:
69
- paths = fetch_data(
70
- subject_ids, recording=recording_ids, on_missing="warn"
71
- )
72
- break
73
- except requests.exceptions.RequestException:
74
- if attempt == max_attempts - 1:
75
- raise
76
- time.sleep(retry_delay_s)
62
+ paths = fetch_data(subject_ids, recording=recording_ids, on_missing="warn")
77
63
 
78
64
  all_base_ds = list()
79
65
  for p in paths:
@@ -25,7 +25,6 @@ from .eegpt import EEGPT
25
25
  from .eegsimpleconv import EEGSimpleConv
26
26
  from .eegsym import EEGSym
27
27
  from .eegtcnet import EEGTCNet
28
- from .emg2qwerty import EMG2QwertyNet
29
28
  from .fbcnet import FBCNet
30
29
  from .fblightconvnet import FBLightConvNet
31
30
  from .fbmsnet import FBMSNet
@@ -96,7 +95,6 @@ __all__ = [
96
95
  "EEGSimpleConv",
97
96
  "EEGTCNet",
98
97
  "DGCNN",
99
- "EMG2QwertyNet",
100
98
  "FBCNet",
101
99
  "FBLightConvNet",
102
100
  "FBMSNet",
@@ -40,7 +40,6 @@ USleep,Sleep Staging,Classification,128,"n_chans, n_outputs, n_times, sfreq",248
40
40
  FBCNet,Motor Imagery,Classification,250,"n_chans, n_outputs, n_times, sfreq",11812,"FCNet(n_chans=22, n_outputs=4, n_times=1000, sfreq=250)","Convolution,FilterBank"
41
41
  FBMSNet,Motor Imagery,Classification,250,"n_chans, n_outputs, n_times, sfreq",16231,"FBMSNet(n_chans=22, n_outputs=4, n_times=1000, sfreq=250)","Convolution,FilterBank"
42
42
  MetaNeuromotorHand,Handwriting (sEMG),CTC Sequence,2000,"n_chans, n_outputs, n_times, sfreq",1021284,"MetaNeuromotorHand(n_chans=16, n_outputs=100, n_times=32000, sfreq=2000)","Convolution,Attention/Transformer"
43
- EMG2QwertyNet,Touch typing (sEMG),CTC Sequence,2000,"n_chans, n_outputs, n_times, sfreq",5293315,"EMG2QwertyNet(n_chans=32, n_outputs=99, n_times=8000, sfreq=2000)","Convolution"
44
43
  FBLightConvNet,Motor Imagery,Classification,250,"n_chans, n_outputs, n_times, sfreq",6596,"FBLightConvNet(n_chans=22, n_outputs=4, n_times=1000, sfreq=250)","Convolution,FilterBank"
45
44
  IFNet,Motor Imagery,Classification,250,"n_chans, n_outputs, n_times, sfreq",9860,"IFNet(n_chans=22, n_outputs=4, n_times=1000, sfreq=250)","Convolution,FilterBank"
46
45
  BrainModule,Speech Decoding,Classification,250,"n_chans, n_outputs, n_times, sfreq",6186909,"BrainModule(n_chans=64, n_outputs=29, n_times=160, sfreq=1000)","Convolution"
@@ -347,17 +347,6 @@ models_mandatory_parameters: list[
347
347
  "n_outputs": 100,
348
348
  },
349
349
  ),
350
- (
351
- "EMG2QwertyNet",
352
- ["n_chans", "n_outputs", "n_times", "sfreq"],
353
- {
354
- "n_chans": 32,
355
- "n_times": 8000,
356
- "sfreq": 2000.0,
357
- "input_window_seconds": 4.0,
358
- "n_outputs": 99,
359
- },
360
- ),
361
350
  ("FBLightConvNet", ["n_chans", "n_outputs", "n_times", "sfreq"], {"sfreq": 200.0}),
362
351
  ("IFNet", ["n_chans", "n_outputs", "n_times", "sfreq"], {"sfreq": 200.0}),
363
352
  ("PBT", ["n_chans", "n_outputs", "n_times"], None),
@@ -408,7 +397,6 @@ non_classification_models = [
408
397
  "InterpolatedSignalJEPA",
409
398
  # Emits a (batch, T_out, vocab) sequence for CTC, not class logits.
410
399
  "MetaNeuromotorHand",
411
- "EMG2QwertyNet",
412
400
  ]
413
401
 
414
402
  ################################################################
@@ -0,0 +1 @@
1
+ __version__ = "1.5.0.dev998"
@@ -0,0 +1,8 @@
1
+ """
2
+ Functions for visualisations, especially of the ConvNets.
3
+ """
4
+
5
+ from .confusion_matrices import plot_confusion_matrix
6
+ from .gradients import compute_amplitude_gradients
7
+
8
+ __all__ = ["compute_amplitude_gradients", "plot_confusion_matrix"]
@@ -0,0 +1,62 @@
1
+ # Authors: Robin Schirrmeister <robintibor@gmail.com>
2
+ # Sarthak Tayal <sarthaktayal2@gmail.com>
3
+ #
4
+ # License: BSD (3-clause)
5
+
6
+ import numpy as np
7
+ import torch
8
+ from skorch.utils import to_numpy, to_tensor
9
+
10
+ from braindecode.util import set_random_seeds
11
+
12
+
13
+ def compute_amplitude_gradients(model, dataset, batch_size, seed=20240205):
14
+ """Compute amplitude gradients after seeding for reproducibility."""
15
+ cuda = next(model.parameters()).is_cuda
16
+ set_random_seeds(seed=seed, cuda=cuda)
17
+ loader = torch.utils.data.DataLoader(
18
+ dataset, batch_size=batch_size, drop_last=False, shuffle=False
19
+ )
20
+ all_amp_grads = []
21
+ for batch_X, _, _ in loader:
22
+ this_amp_grads = compute_amplitude_gradients_for_X(
23
+ model,
24
+ batch_X,
25
+ )
26
+ all_amp_grads.append(this_amp_grads)
27
+ all_amp_grads = np.concatenate(all_amp_grads, axis=1)
28
+ return all_amp_grads
29
+
30
+
31
+ def compute_amplitude_gradients_for_X(model, X):
32
+ device = next(model.parameters()).device
33
+ ffted = np.fft.rfft(X, axis=2)
34
+ amps = np.abs(ffted)
35
+ phases = np.angle(ffted)
36
+ amps_th = to_tensor(amps.astype(np.float32), device=device).requires_grad_(True)
37
+ phases_th = to_tensor(phases.astype(np.float32), device=device).requires_grad_(True)
38
+
39
+ # rebuild fft coefficients from amplitude and phase as real valued pairs,
40
+ # convert to complex, and invert back to the time domain.
41
+ # torch.irfft was removed after being deprecated since pytorch 1.7,
42
+ # so we use torch.fft.irfft which expects complex input directly.
43
+ fft_coefs = amps_th.unsqueeze(-1) * torch.stack(
44
+ (torch.cos(phases_th), torch.sin(phases_th)), dim=-1
45
+ )
46
+ fft_coefs = fft_coefs.squeeze(3)
47
+
48
+ complex_fft_coefs = torch.view_as_complex(fft_coefs)
49
+ iffted = torch.fft.irfft(complex_fft_coefs, n=X.shape[2], dim=2)
50
+
51
+ outs = model(iffted)
52
+
53
+ n_filters = outs.shape[1]
54
+ amp_grads_per_filter = np.full((n_filters,) + ffted.shape, np.nan, dtype=np.float32)
55
+ for i_filter in range(n_filters):
56
+ mean_out = torch.mean(outs[:, i_filter])
57
+ mean_out.backward(retain_graph=True)
58
+ amp_grads = to_numpy(amps_th.grad.clone())
59
+ amp_grads_per_filter[i_filter] = amp_grads
60
+ amps_th.grad.zero_()
61
+ assert not np.any(np.isnan(amp_grads_per_filter))
62
+ return amp_grads_per_filter
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: braindecode
3
- Version: 1.5.0.dev997
3
+ Version: 1.5.0.dev998
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>
@@ -43,8 +43,6 @@ Requires-Dist: eegprep[eeglabio]>=0.2.23; extra == "eegprep"
43
43
  Provides-Extra: hub
44
44
  Requires-Dist: huggingface_hub[torch]>=0.20.0; extra == "hub"
45
45
  Requires-Dist: zarr>=3.0; extra == "hub"
46
- Provides-Extra: viz
47
- Requires-Dist: captum>=0.7.0; extra == "viz"
48
46
  Provides-Extra: tests
49
47
  Requires-Dist: pytest; extra == "tests"
50
48
  Requires-Dist: pytest-cov; extra == "tests"
@@ -72,7 +70,7 @@ Requires-Dist: sphinx_design; extra == "docs"
72
70
  Requires-Dist: lightning; extra == "docs"
73
71
  Requires-Dist: seaborn; extra == "docs"
74
72
  Requires-Dist: pre-commit; extra == "docs"
75
- Requires-Dist: openneuro-py>=2026.4.0; extra == "docs"
73
+ Requires-Dist: openneuro-py; extra == "docs"
76
74
  Requires-Dist: plotly; extra == "docs"
77
75
  Requires-Dist: shap; extra == "docs"
78
76
  Requires-Dist: nbformat; extra == "docs"
@@ -84,7 +82,6 @@ Requires-Dist: braindecode[docs]; extra == "all"
84
82
  Requires-Dist: braindecode[hub]; extra == "all"
85
83
  Requires-Dist: braindecode[eegprep]; extra == "all"
86
84
  Requires-Dist: braindecode[typing]; extra == "all"
87
- Requires-Dist: braindecode[viz]; extra == "all"
88
85
  Dynamic: license-file
89
86
 
90
87
  .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.17699192.svg
@@ -77,7 +77,6 @@ braindecode/models/eegpt.py
77
77
  braindecode/models/eegsimpleconv.py
78
78
  braindecode/models/eegsym.py
79
79
  braindecode/models/eegtcnet.py
80
- braindecode/models/emg2qwerty.py
81
80
  braindecode/models/fbcnet.py
82
81
  braindecode/models/fblightconvnet.py
83
82
  braindecode/models/fbmsnet.py
@@ -133,12 +132,8 @@ braindecode/training/callbacks.py
133
132
  braindecode/training/losses.py
134
133
  braindecode/training/scoring.py
135
134
  braindecode/visualization/__init__.py
136
- braindecode/visualization/attribution.py
137
135
  braindecode/visualization/confusion_matrices.py
138
- braindecode/visualization/frequency.py
139
- braindecode/visualization/metrics.py
140
- braindecode/visualization/sanity.py
141
- braindecode/visualization/topology.py
136
+ braindecode/visualization/gradients.py
142
137
  docs/Makefile
143
138
  docs/api.rst
144
139
  docs/cite.rst
@@ -20,7 +20,6 @@ braindecode[docs]
20
20
  braindecode[hub]
21
21
  braindecode[eegprep]
22
22
  braindecode[typing]
23
- braindecode[viz]
24
23
 
25
24
  [docs]
26
25
  sphinx_gallery
@@ -38,7 +37,7 @@ sphinx_design
38
37
  lightning
39
38
  seaborn
40
39
  pre-commit
41
- openneuro-py>=2026.4.0
40
+ openneuro-py
42
41
  plotly
43
42
  shap
44
43
  nbformat
@@ -66,6 +65,3 @@ bids_validator
66
65
  [typing]
67
66
  exca>=0.5.10
68
67
  numpydantic>=1.7
69
-
70
- [viz]
71
- captum>=0.7.0
@@ -153,7 +153,6 @@ interface for all EEG models and can derive variable names when needed.
153
153
  EEGSimpleConv
154
154
  EEGSym
155
155
  EEGTCNet
156
- EMG2QwertyNet
157
156
  FBCNet
158
157
  FBLightConvNet
159
158
  FBMSNet
@@ -803,107 +802,16 @@ Functions available in braindecode util module.
803
802
  Visualization
804
803
  ***************
805
804
 
806
- Tools for opening up trained EEG decoders: per-trial attribution maps, sanity-check
807
- protocols that probe whether those maps reflect what the model actually learned,
808
- attribution-quality metrics, topographic projection, and confusion-matrix plotting.
809
-
810
- The end-to-end workflow tracks the EEG-XAI benchmark of Sujatha Ravindran &
811
- Contreras-Vidal (Sci Rep 2023, DOI `10.1038/s41598-023-43871-8
812
- <https://doi.org/10.1038/s41598-023-43871-8>`_): compute attributions, randomize labels
813
- and weights, score the resulting maps against the trained-model reference, and decide
814
- which methods are trustworthy on your data. See the :ref:`interpretability tutorial
815
- <interpretability-tutorial>` for a worked example on BCI IV 2a.
805
+ Visualization module contains functions for visualizing EEG data, including plotting the
806
+ confusion matrix and computing amplitude gradients. The visualization module is useful
807
+ for understanding the performance of the model and for interpreting the results.
816
808
 
817
809
  :py:mod:`braindecode.visualization`:
818
810
 
819
811
  .. currentmodule:: braindecode.visualization
820
812
 
821
- Time-domain attribution
822
- =======================
823
-
824
- Per-trial attribution maps in the input domain. Each function takes ``(model, x,
825
- target)`` and returns a tensor with the same spatial shape as ``x``; all are thin
826
- wrappers around `captum <https://captum.ai/>`_ (a soft dependency installed via ``pip
827
- install braindecode[viz]``) and raise :class:`ImportError` without it.
828
-
829
- .. autosummary::
830
- :toctree: generated/
831
-
832
- saliency
833
- input_x_gradient
834
- integrated_gradients
835
- layer_grad_cam
836
- guided_backprop
837
- deconvolution
838
- deep_lift
839
- lrp
840
-
841
- Frequency-domain attribution
842
- ============================
843
-
844
- Gradient of each model output with respect to the **amplitude spectrum** of the input —
845
- a complement to the time-domain methods that makes oscillatory contributions (e.g.
846
- alpha/beta motor imagery) visible directly in the topomap. Implemented in pure PyTorch
847
- via ``rfft``/``irfft`` round-tripping; no captum needed.
848
-
849
- .. autosummary::
850
- :toctree: generated/
851
-
852
- amplitude_gradients
853
- amplitude_gradients_per_trial
854
-
855
- Sanity-check protocols
856
- ======================
857
-
858
- Adebayo et al. (NeurIPS 2018) randomization checks for attribution maps, reused on EEG
859
- decoders by Sujatha Ravindran & Contreras-Vidal. :func:`random_target` powers the
860
- **label-randomization** check (does the map change when you ask about the wrong class?)
861
- and :func:`cascading_layer_reset` powers the **weight-randomization** check (does the
862
- map collapse as the trained weights are progressively replaced?). An attribution method
863
- that survives both is suspicious — its output likely reflects architecture rather than
864
- learning.
865
-
866
- .. autosummary::
867
- :toctree: generated/
868
-
869
- random_target
870
- cascading_layer_reset
871
-
872
- Attribution-quality metrics
873
- ===========================
874
-
875
- Score how similar two attribution maps are: typically a trained-model attribution
876
- against a randomized-model attribution, or against a ground-truth mask from a simulator.
877
- :func:`compute_metrics` returns twelve cosine / Pearson / mass-accuracy / rank-accuracy
878
- variants; :func:`compute_ssim_metrics` adds four SSIM-based scores using a pure-torch
879
- reimplementation of skimage's structural similarity (no extra dependency). Pass
880
- ``chs_info=`` to score topographic projections instead of raw attribution maps.
881
-
882
- .. autosummary::
883
- :toctree: generated/
884
-
885
- compute_metrics
886
- compute_ssim_metrics
887
- METRIC_NAMES
888
- SSIM_METRIC_NAMES
889
-
890
- Topography
891
- ==========
892
-
893
- Project per-channel scalar values onto a 2-D scalp topomap grid via Clough-Tocher
894
- triangulation on MNE-derived sensor coordinates. Returns a plain ``ndarray`` so callers
895
- can compose with their own plotting stack rather than going through
896
- :func:`mne.viz.plot_topomap` (and its matplotlib roundtrip).
897
-
898
- .. autosummary::
899
- :toctree: generated/
900
-
901
- project_to_topomap
902
-
903
- Plotting
904
- ========
905
-
906
813
  .. autosummary::
907
814
  :toctree: generated/
908
815
 
816
+ compute_amplitude_gradients
909
817
  plot_confusion_matrix
@@ -62,16 +62,6 @@ Enhancements
62
62
  instantiation, so keeping them in ``state_dict`` only bloated checkpoints and
63
63
  caused spurious mismatches when ``n_chans`` (or the position-bank config)
64
64
  differed between save and load. (:gh:`993` by `Pierre Guetschel`_)
65
- - Add :mod:`braindecode.visualization` interpretability utilities, all built on
66
- plain PyTorch autograd with no extra dependencies:
67
- :func:`~braindecode.visualization.saliency`,
68
- :func:`~braindecode.visualization.input_x_gradient`,
69
- :func:`~braindecode.visualization.integrated_gradients`,
70
- :func:`~braindecode.visualization.layer_grad_cam`,
71
- :func:`~braindecode.visualization.project_to_topomap` (thin wrapper around
72
- :func:`mne.viz.plot_topomap`), and :func:`~braindecode.visualization.compute_metrics`
73
- for quantitative attribution comparison. A new tutorial,
74
- :ref:`interpretability-tutorial`, walks through the full pipeline.
75
65
  - Add :class:`braindecode.models.MetaNeuromotorHand`, a port of the
76
66
  handwriting decoder from Meta / CTRL-labs' generic neuromotor interface
77
67
  (Kaifosh, Reardon et al., Nature 2025). The model takes raw 16-channel
@@ -87,26 +77,6 @@ Enhancements
87
77
  the upstream repository; see the class docstring for the license
88
78
  warning and the pretrained-checkpoint loading recipe.
89
79
  By `Bruno Aristimunha`_.
90
- - Add :class:`braindecode.models.EMG2QwertyNet`, a port of the
91
- TDS-Conv-CTC touch-typing decoder from
92
- ``facebookresearch/emg2qwerty`` (Sivakumar et al., NeurIPS 2024). The
93
- model takes raw 32-channel surface EMG (two 16-electrode wristbands at
94
- 2 kHz) and emits per-frame scores over a 99-class typing
95
- vocabulary (98 keys + CTC blank); pass ``log_softmax=True`` to get
96
- log-probabilities directly consumable by :class:`~torch.nn.CTCLoss`. The pipeline is a parameter-free
97
- log-spectrogram front-end, per-electrode-per-band BatchNorm, a
98
- circular rotation-invariant MLP (one per band), and a stack of
99
- Time-Depth-Separable convolutional blocks (Hannun et al., 2019) without
100
- temporal padding. The encoder ``nn.Sequential`` mirrors upstream's
101
- ``TDSConvCTCModule.model`` indices for parameter-bearing children, so
102
- upstream emg2qwerty checkpoints load directly via ``load_state_dict``
103
- (after stripping the PyTorch-Lightning ``network.`` prefix); the
104
- class-level :attr:`~braindecode.models.EMG2QwertyNet.mapping` only
105
- remaps the head from ``model.4.{weight,bias}`` to
106
- ``final_layer.{weight,bias}``. Distributed under CC BY-NC 4.0 to
107
- match the upstream repository; see the class docstring for the
108
- license warning and the pretrained-checkpoint loading recipe.
109
- By `Bruno Aristimunha`_.
110
80
 
111
81
  API and behavior changes
112
82
  ========================
@@ -171,14 +141,6 @@ Bug fixes
171
141
  embedding weights when fine-tuning on a subset of the pre-training channels.
172
142
  Two new HuggingFace checkpoints are published: ``braindecode/signal-jepa`` and
173
143
  ``braindecode/signal-jepa_without-chans`` (:gh:`991` by `Pierre Guetschel`_)
174
- - Bump ``openneuro-py`` to ``>=2026.4.0`` so the docs build picks up upstream
175
- PR ``#308`` (``DatasetFile.key`` → ``id``). The previous ``<2026.4`` pin
176
- (:gh:`1000`) avoided a libc double-free seen with newer releases but broke
177
- ``examples/datasets_io/plot_bids_dataset_example.py`` against the live
178
- OpenNeuro 5.0.0 GraphQL schema (``Cannot query field "key" on type
179
- "DatasetFile"``) (:gh:`1002` by `Bruno Aristimunha`_)
180
- - Retry transient TLS failures from ``physionet.org`` when fetching
181
- :class:`braindecode.datasets.SleepPhysionet` (by `Bruno Aristimunha`_)
182
144
 
183
145
  Code health
184
146
  ============
@@ -78,7 +78,6 @@ documentation = "https://braindecode.org/stable/index.html"
78
78
  moabb = ["moabb>=1.4.3"]
79
79
  eegprep = ["eegprep[eeglabio]>=0.2.23"]
80
80
  hub = ["huggingface_hub[torch]>=0.20.0", "zarr>=3.0"]
81
- viz = ["captum>=0.7.0"]
82
81
  tests = [
83
82
  'pytest',
84
83
  'pytest-cov',
@@ -109,7 +108,7 @@ docs = [
109
108
  'lightning',
110
109
  'seaborn',
111
110
  'pre-commit',
112
- 'openneuro-py>=2026.4.0', # 2026.4.0 fixes DatasetFile.key->id after the OpenNeuro 5.0.0 schema change; older versions break against the live GraphQL server
111
+ 'openneuro-py',
113
112
  'plotly',
114
113
  'shap',
115
114
  'nbformat',
@@ -123,7 +122,6 @@ all = [
123
122
  "braindecode[hub]",
124
123
  "braindecode[eegprep]",
125
124
  "braindecode[typing]",
126
- "braindecode[viz]",
127
125
  ]
128
126
 
129
127
  [tool.setuptools]