Braindecode 1.5.0.dev990__tar.gz → 1.5.0.dev996__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 (174) hide show
  1. {braindecode-1.5.0.dev990/braindecode.egg-info → braindecode-1.5.0.dev996}/PKG-INFO +2 -6
  2. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/datasets/sleep_physionet.py +1 -15
  3. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/__init__.py +0 -2
  4. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/base.py +4 -16
  5. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/summary.csv +0 -1
  6. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/util.py +0 -12
  7. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/preprocessing/preprocess.py +17 -38
  8. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/preprocessing/windowers.py +3 -9
  9. braindecode-1.5.0.dev996/braindecode/version.py +1 -0
  10. braindecode-1.5.0.dev996/braindecode/visualization/__init__.py +8 -0
  11. braindecode-1.5.0.dev996/braindecode/visualization/gradients.py +62 -0
  12. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996/braindecode.egg-info}/PKG-INFO +2 -6
  13. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode.egg-info/SOURCES.txt +1 -6
  14. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode.egg-info/requires.txt +1 -6
  15. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/docs/api.rst +4 -96
  16. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/docs/cite.rst +2 -2
  17. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/docs/conf.py +2 -34
  18. braindecode-1.5.0.dev996/docs/index.rst +48 -0
  19. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/docs/whats_new.rst +0 -62
  20. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/pyproject.toml +1 -4
  21. braindecode-1.5.0.dev990/braindecode/models/emg2qwerty.py +0 -714
  22. braindecode-1.5.0.dev990/braindecode/version.py +0 -1
  23. braindecode-1.5.0.dev990/braindecode/visualization/__init__.py +0 -45
  24. braindecode-1.5.0.dev990/braindecode/visualization/attribution.py +0 -152
  25. braindecode-1.5.0.dev990/braindecode/visualization/frequency.py +0 -89
  26. braindecode-1.5.0.dev990/braindecode/visualization/metrics.py +0 -414
  27. braindecode-1.5.0.dev990/braindecode/visualization/sanity.py +0 -117
  28. braindecode-1.5.0.dev990/braindecode/visualization/topology.py +0 -64
  29. braindecode-1.5.0.dev990/docs/index.rst +0 -749
  30. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/LICENSE.txt +0 -0
  31. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/MANIFEST.in +0 -0
  32. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/NOTICE.txt +0 -0
  33. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/README.rst +0 -0
  34. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/__init__.py +0 -0
  35. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/augmentation/__init__.py +0 -0
  36. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/augmentation/base.py +0 -0
  37. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/augmentation/functional.py +0 -0
  38. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/augmentation/transforms.py +0 -0
  39. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/classifier.py +0 -0
  40. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/datasets/__init__.py +0 -0
  41. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/datasets/base.py +0 -0
  42. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/datasets/bbci.py +0 -0
  43. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/datasets/bcicomp.py +0 -0
  44. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/datasets/bids/__init__.py +0 -0
  45. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/datasets/bids/datasets.py +0 -0
  46. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/datasets/bids/format.py +0 -0
  47. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/datasets/bids/hub.py +0 -0
  48. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/datasets/bids/hub_format.py +0 -0
  49. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/datasets/bids/hub_io.py +0 -0
  50. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/datasets/bids/hub_validation.py +0 -0
  51. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/datasets/bids/iterable.py +0 -0
  52. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/datasets/chb_mit.py +0 -0
  53. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/datasets/mne.py +0 -0
  54. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/datasets/moabb.py +0 -0
  55. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/datasets/nmt.py +0 -0
  56. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/datasets/registry.py +0 -0
  57. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/datasets/siena.py +0 -0
  58. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/datasets/sleep_physio_challe_18.py +0 -0
  59. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/datasets/tuh.py +0 -0
  60. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/datasets/utils.py +0 -0
  61. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/datasets/xy.py +0 -0
  62. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/datautil/__init__.py +0 -0
  63. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/datautil/channel_utils.py +0 -0
  64. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/datautil/hub_formats.py +0 -0
  65. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/datautil/serialization.py +0 -0
  66. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/datautil/util.py +0 -0
  67. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/eegneuralnet.py +0 -0
  68. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/functional/__init__.py +0 -0
  69. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/functional/functions.py +0 -0
  70. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/functional/initialization.py +0 -0
  71. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/atcnet.py +0 -0
  72. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/attentionbasenet.py +0 -0
  73. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/attn_sleep.py +0 -0
  74. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/bendr.py +0 -0
  75. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/biot.py +0 -0
  76. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/brainmodule.py +0 -0
  77. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/cbramod.py +0 -0
  78. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/codebrain.py +0 -0
  79. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/config.py +0 -0
  80. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/contrawr.py +0 -0
  81. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/ctnet.py +0 -0
  82. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/deep4.py +0 -0
  83. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/deepsleepnet.py +0 -0
  84. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/dgcnn.py +0 -0
  85. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/eegconformer.py +0 -0
  86. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/eeginception_erp.py +0 -0
  87. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/eeginception_mi.py +0 -0
  88. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/eegitnet.py +0 -0
  89. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/eegminer.py +0 -0
  90. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/eegnet.py +0 -0
  91. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/eegnex.py +0 -0
  92. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/eegpt.py +0 -0
  93. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/eegsimpleconv.py +0 -0
  94. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/eegsym.py +0 -0
  95. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/eegtcnet.py +0 -0
  96. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/fbcnet.py +0 -0
  97. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/fblightconvnet.py +0 -0
  98. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/fbmsnet.py +0 -0
  99. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/hybrid.py +0 -0
  100. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/ifnet.py +0 -0
  101. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/interpolated.py +0 -0
  102. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/labram.py +0 -0
  103. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/luna.py +0 -0
  104. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/medformer.py +0 -0
  105. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/meta_neuromotor.py +0 -0
  106. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/msvtnet.py +0 -0
  107. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/patchedtransformer.py +0 -0
  108. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/reve.py +0 -0
  109. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/sccnet.py +0 -0
  110. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/shallow_fbcsp.py +0 -0
  111. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/signal_jepa.py +0 -0
  112. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/sinc_shallow.py +0 -0
  113. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/sleep_stager_blanco_2020.py +0 -0
  114. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/sleep_stager_chambon_2018.py +0 -0
  115. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/sparcnet.py +0 -0
  116. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/sstdpn.py +0 -0
  117. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/syncnet.py +0 -0
  118. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/tcn.py +0 -0
  119. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/tidnet.py +0 -0
  120. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/tsinception.py +0 -0
  121. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/models/usleep.py +0 -0
  122. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/modules/__init__.py +0 -0
  123. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/modules/activation.py +0 -0
  124. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/modules/attention.py +0 -0
  125. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/modules/blocks.py +0 -0
  126. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/modules/convolution.py +0 -0
  127. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/modules/filter.py +0 -0
  128. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/modules/interpolation.py +0 -0
  129. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/modules/layers.py +0 -0
  130. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/modules/linear.py +0 -0
  131. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/modules/parametrization.py +0 -0
  132. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/modules/stats.py +0 -0
  133. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/modules/util.py +0 -0
  134. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/modules/wrapper.py +0 -0
  135. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/preprocessing/__init__.py +0 -0
  136. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/preprocessing/eegprep_preprocess.py +0 -0
  137. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/preprocessing/mne_preprocess.py +0 -0
  138. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/preprocessing/util.py +0 -0
  139. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/regressor.py +0 -0
  140. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/samplers/__init__.py +0 -0
  141. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/samplers/base.py +0 -0
  142. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/samplers/ssl.py +0 -0
  143. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/training/__init__.py +0 -0
  144. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/training/callbacks.py +0 -0
  145. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/training/losses.py +0 -0
  146. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/training/scoring.py +0 -0
  147. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/util.py +0 -0
  148. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode/visualization/confusion_matrices.py +0 -0
  149. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode.egg-info/dependency_links.txt +0 -0
  150. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/braindecode.egg-info/top_level.txt +0 -0
  151. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/docs/Makefile +0 -0
  152. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/docs/_templates/autosummary/class.rst +0 -0
  153. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/docs/_templates/autosummary/class_in_subdir.rst +0 -0
  154. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/docs/_templates/autosummary/function.rst +0 -0
  155. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/docs/_templates/autosummary/function_in_subdir.rst +0 -0
  156. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/docs/help.rst +0 -0
  157. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/docs/install/install.rst +0 -0
  158. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/docs/install/install_pip.rst +0 -0
  159. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/docs/install/install_source.rst +0 -0
  160. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/docs/models/categorization/attention.rst +0 -0
  161. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/docs/models/categorization/channel.rst +0 -0
  162. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/docs/models/categorization/convolution.rst +0 -0
  163. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/docs/models/categorization/filterbank.rst +0 -0
  164. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/docs/models/categorization/gnn.rst +0 -0
  165. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/docs/models/categorization/interpretable.rst +0 -0
  166. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/docs/models/categorization/lbm.rst +0 -0
  167. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/docs/models/categorization/recurrent.rst +0 -0
  168. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/docs/models/categorization/spd.rst +0 -0
  169. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/docs/models/models.rst +0 -0
  170. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/docs/models/models_categorization.rst +0 -0
  171. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/docs/models/models_table.rst +0 -0
  172. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/docs/models/models_visualization.rst +0 -0
  173. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/docs/sg_execution_times.rst +0 -0
  174. {braindecode-1.5.0.dev990 → braindecode-1.5.0.dev996}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: braindecode
3
- Version: 1.5.0.dev990
3
+ Version: 1.5.0.dev996
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"
@@ -63,7 +61,6 @@ Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
63
61
  Requires-Dist: sphinx-autobuild; extra == "docs"
64
62
  Requires-Dist: sphinxcontrib-bibtex; extra == "docs"
65
63
  Requires-Dist: sphinx_sitemap; extra == "docs"
66
- Requires-Dist: sphinxext-opengraph; extra == "docs"
67
64
  Requires-Dist: pydata_sphinx_theme; extra == "docs"
68
65
  Requires-Dist: numpydoc; extra == "docs"
69
66
  Requires-Dist: memory_profiler; extra == "docs"
@@ -73,7 +70,7 @@ Requires-Dist: sphinx_design; extra == "docs"
73
70
  Requires-Dist: lightning; extra == "docs"
74
71
  Requires-Dist: seaborn; extra == "docs"
75
72
  Requires-Dist: pre-commit; extra == "docs"
76
- Requires-Dist: openneuro-py>=2026.4.0; extra == "docs"
73
+ Requires-Dist: openneuro-py; extra == "docs"
77
74
  Requires-Dist: plotly; extra == "docs"
78
75
  Requires-Dist: shap; extra == "docs"
79
76
  Requires-Dist: nbformat; extra == "docs"
@@ -85,7 +82,6 @@ Requires-Dist: braindecode[docs]; extra == "all"
85
82
  Requires-Dist: braindecode[hub]; extra == "all"
86
83
  Requires-Dist: braindecode[eegprep]; extra == "all"
87
84
  Requires-Dist: braindecode[typing]; extra == "all"
88
- Requires-Dist: braindecode[viz]; extra == "all"
89
85
  Dynamic: license-file
90
86
 
91
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",
@@ -33,25 +33,13 @@ huggingface_hub = _soft_import(
33
33
  HAS_HF_HUB = huggingface_hub is not False
34
34
 
35
35
 
36
- _HF_INSTALL_HINT = (
37
- "requires the `huggingface_hub` package. "
38
- "Install with: pip install 'braindecode[hub]'"
39
- )
40
-
41
-
42
- class _BaseHubMixinStub:
43
- @classmethod
44
- def from_pretrained(cls, *args, **kwargs):
45
- raise ImportError(f"{cls.__name__}.from_pretrained() {_HF_INSTALL_HINT}")
46
-
47
- def push_to_hub(self, *args, **kwargs):
48
- raise ImportError(f"{type(self).__name__}.push_to_hub() {_HF_INSTALL_HINT}")
36
+ class _BaseHubMixin:
37
+ pass
49
38
 
50
39
 
51
40
  # Define base class for hub mixin
52
- _BaseHubMixin: Type = (
53
- huggingface_hub.PyTorchModelHubMixin if HAS_HF_HUB else _BaseHubMixinStub
54
- )
41
+ if HAS_HF_HUB:
42
+ _BaseHubMixin: Type = huggingface_hub.PyTorchModelHubMixin # type: ignore
55
43
 
56
44
 
57
45
  def deprecated_args(obj, *old_new_args):
@@ -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
  ################################################################
@@ -6,7 +6,6 @@
6
6
  # David Sabbagh <dav.sabbagh@gmail.com>
7
7
  # Bruno Aristimunha <b.aristimunha@gmail.com>
8
8
  # Léo Burgund <leo.burgund@gmail.com>
9
- # Sarthak Tayal <sarthaktayal2@gmail.com>
10
9
  #
11
10
  # License: BSD (3-clause)
12
11
 
@@ -218,7 +217,6 @@ def preprocess(
218
217
  offset: int = 0,
219
218
  copy_data: bool | None = None,
220
219
  parallel_kwargs: dict | None = None,
221
- max_nbytes: int | str | None = "1M",
222
220
  ):
223
221
  """Apply preprocessors to a concat dataset.
224
222
 
@@ -246,20 +244,14 @@ def preprocess(
246
244
  Additional keyword arguments forwarded to ``joblib.Parallel``.
247
245
  Defaults to None (equivalent to ``{}``).
248
246
  See https://joblib.readthedocs.io/en/stable/generated/joblib.Parallel.html for details.
249
- max_nbytes : int, str, or None
250
- Threshold (in bytes; or e.g. ``"1M"``) above which joblib memory-maps
251
- preloaded arrays as read-only when dispatching to worker processes.
252
- Effective only when ``n_jobs != 1``. Pass ``None`` to disable memory
253
- mapping when a preprocessor resizes the underlying data (for example
254
- ``filterbank``), which would otherwise fail with an ``mmap can't
255
- resize a readonly`` error. ``parallel_kwargs['max_nbytes']`` takes
256
- precedence if both are provided.
257
247
 
258
248
  Returns
259
249
  -------
260
250
  BaseConcatDataset
261
251
  Preprocessed dataset.
262
252
  """
253
+ # In case of serialization, make sure directory is available before
254
+ # preprocessing
263
255
  if save_dir is not None and not overwrite:
264
256
  _check_save_dir_empty(save_dir)
265
257
 
@@ -274,35 +266,22 @@ def preprocess(
274
266
  parallel_params.setdefault(
275
267
  "prefer", "threads" if platform.system() == "Windows" else None
276
268
  )
277
- parallel_params.setdefault("max_nbytes", max_nbytes)
278
-
279
- try:
280
- list_of_ds = Parallel(n_jobs=n_jobs, **parallel_params)(
281
- delayed(_preprocess)(
282
- ds,
283
- i + offset,
284
- preprocessors,
285
- save_dir,
286
- overwrite,
287
- copy_data=(
288
- (parallel_processing and (save_dir is None))
289
- if copy_data is None
290
- else copy_data
291
- ),
292
- )
293
- for i, ds in enumerate(concat_ds.datasets)
269
+
270
+ list_of_ds = Parallel(n_jobs=n_jobs, **parallel_params)(
271
+ delayed(_preprocess)(
272
+ ds,
273
+ i + offset,
274
+ preprocessors,
275
+ save_dir,
276
+ overwrite,
277
+ copy_data=(
278
+ (parallel_processing and (save_dir is None))
279
+ if copy_data is None
280
+ else copy_data
281
+ ),
294
282
  )
295
- except (BufferError, ValueError, OSError) as exc:
296
- msg = str(exc).lower().replace("-", "")
297
- if "mmap" in msg and "readonly" in msg:
298
- raise RuntimeError(
299
- "Parallel preprocessing failed because joblib memory-mapped "
300
- "a preloaded array that a preprocessor then attempted to "
301
- "resize (e.g. ``filterbank``). Pass ``max_nbytes=None`` to "
302
- "``preprocess`` to disable memory mapping, or supply a "
303
- "``save_dir`` so the data is reloaded with ``preload=False``."
304
- ) from exc
305
- raise
283
+ for i, ds in enumerate(concat_ds.datasets)
284
+ )
306
285
 
307
286
  if save_dir is not None: # Reload datasets and replace in concat_ds
308
287
  ids_to_load = [i + offset for i in range(len(concat_ds.datasets))]
@@ -498,7 +498,7 @@ def create_fixed_length_windows(
498
498
  EEGWindowsDataset objects with the extracted windows, depending on
499
499
  the value of ``use_mne_epochs``.
500
500
  """
501
- stop_offset_samples, window_stride_samples, drop_last_window = (
501
+ stop_offset_samples, drop_last_window = (
502
502
  _check_and_set_fixed_length_window_arguments(
503
503
  start_offset_samples,
504
504
  stop_offset_samples,
@@ -1245,14 +1245,8 @@ def _check_and_set_fixed_length_window_arguments(
1245
1245
  lazy_metadata,
1246
1246
  ):
1247
1247
  """Raises warnings for incorrect input arguments and will set correct default values for
1248
- stop_offset_samples, window_stride_samples & drop_last_window, if necessary.
1248
+ stop_offset_samples & drop_last_window, if necessary.
1249
1249
  """
1250
- # default stride to window size for non-overlapping windows
1251
- if window_size_samples is not None and window_stride_samples is None:
1252
- window_stride_samples = window_size_samples
1253
- if drop_last_window is None:
1254
- drop_last_window = True
1255
-
1256
1250
  _check_windowing_arguments(
1257
1251
  start_offset_samples,
1258
1252
  stop_offset_samples,
@@ -1301,7 +1295,7 @@ def _check_and_set_fixed_length_window_arguments(
1301
1295
  raise ValueError(
1302
1296
  "Cannot have drop_last_window=False and lazy_metadata=True at the same time."
1303
1297
  )
1304
- return stop_offset_samples, window_stride_samples, drop_last_window
1298
+ return stop_offset_samples, drop_last_window
1305
1299
 
1306
1300
 
1307
1301
  def _get_windowing_kwargs(windowing_func_locals):
@@ -0,0 +1 @@
1
+ __version__ = "1.5.0.dev996"
@@ -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.dev990
3
+ Version: 1.5.0.dev996
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"
@@ -63,7 +61,6 @@ Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
63
61
  Requires-Dist: sphinx-autobuild; extra == "docs"
64
62
  Requires-Dist: sphinxcontrib-bibtex; extra == "docs"
65
63
  Requires-Dist: sphinx_sitemap; extra == "docs"
66
- Requires-Dist: sphinxext-opengraph; extra == "docs"
67
64
  Requires-Dist: pydata_sphinx_theme; extra == "docs"
68
65
  Requires-Dist: numpydoc; extra == "docs"
69
66
  Requires-Dist: memory_profiler; extra == "docs"
@@ -73,7 +70,7 @@ Requires-Dist: sphinx_design; extra == "docs"
73
70
  Requires-Dist: lightning; extra == "docs"
74
71
  Requires-Dist: seaborn; extra == "docs"
75
72
  Requires-Dist: pre-commit; extra == "docs"
76
- Requires-Dist: openneuro-py>=2026.4.0; extra == "docs"
73
+ Requires-Dist: openneuro-py; extra == "docs"
77
74
  Requires-Dist: plotly; extra == "docs"
78
75
  Requires-Dist: shap; extra == "docs"
79
76
  Requires-Dist: nbformat; extra == "docs"
@@ -85,7 +82,6 @@ Requires-Dist: braindecode[docs]; extra == "all"
85
82
  Requires-Dist: braindecode[hub]; extra == "all"
86
83
  Requires-Dist: braindecode[eegprep]; extra == "all"
87
84
  Requires-Dist: braindecode[typing]; extra == "all"
88
- Requires-Dist: braindecode[viz]; extra == "all"
89
85
  Dynamic: license-file
90
86
 
91
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
@@ -29,7 +28,6 @@ sphinx-autodoc-typehints
29
28
  sphinx-autobuild
30
29
  sphinxcontrib-bibtex
31
30
  sphinx_sitemap
32
- sphinxext-opengraph
33
31
  pydata_sphinx_theme
34
32
  numpydoc
35
33
  memory_profiler
@@ -39,7 +37,7 @@ sphinx_design
39
37
  lightning
40
38
  seaborn
41
39
  pre-commit
42
- openneuro-py>=2026.4.0
40
+ openneuro-py
43
41
  plotly
44
42
  shap
45
43
  nbformat
@@ -67,6 +65,3 @@ bids_validator
67
65
  [typing]
68
66
  exca>=0.5.10
69
67
  numpydantic>=1.7
70
-
71
- [viz]
72
- 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
@@ -21,7 +21,7 @@ You can use the following BibTeX entry:
21
21
 
22
22
  .. code-block:: bibtex
23
23
 
24
- @misc{braindecode,
24
+ @software{braindecode,
25
25
  author = {Aristimunha, Bruno and
26
26
  Guetschel, Pierre and
27
27
  Wimpff, Martin and
@@ -41,9 +41,9 @@ You can use the following BibTeX entry:
41
41
  Schirrmeister, Robin Tibor},
42
42
  title = {Braindecode: toolbox for decoding raw electrophysiological brain data
43
43
  with deep learning models},
44
- howpublished = {Zenodo},
45
44
  url = {https://github.com/braindecode/braindecode},
46
45
  doi = {10.5281/zenodo.17699192},
46
+ publisher = {Zenodo},
47
47
  license = {BSD-3-Clause},
48
48
  }
49
49
 
@@ -100,10 +100,8 @@ extensions = [
100
100
  "sphinx.ext.linkcode",
101
101
  "sphinx_sitemap",
102
102
  "sphinx_design",
103
- "sphinxext.opengraph",
104
103
  "numpydoc",
105
104
  "gh_substitutions",
106
- "zoo_data_gen",
107
105
  ]
108
106
 
109
107
 
@@ -350,9 +348,7 @@ html_theme_options = {
350
348
  },
351
349
  "footer_start": ["copyright"],
352
350
  # 'pygment_light_style': 'default',
353
- # Analytics intentionally NOT configured here — the project uses GTM
354
- # (GTM-NWDKLVNR) injected from _templates/layout.html as the single
355
- # entry point. Adding theme analytics on top would double-count.
351
+ "analytics": dict(google_analytics_id="G-7Q43R82K6D"),
356
352
  }
357
353
 
358
354
  # The name of an image file (relative to this directory) to place at the top
@@ -363,16 +359,9 @@ html_logo = "_static/braindecode_symbol.png"
363
359
  # relative to this directory. They are copied after the builtin static files,
364
360
  # so a file named "default.css" will overwrite the builtin "default.css".
365
361
  html_static_path = ["_static"]
366
- # Files copied verbatim into the build root (robots.txt, etc.)
367
- html_extra_path = ["_extra"]
368
362
  html_css_files = [
369
363
  "style.css",
370
364
  ]
371
- # Note: landing.css and the landing JS files (zoo-data.js, landing.js)
372
- # are *not* registered globally — they only ship on the index page,
373
- # injected from `_templates/layout.html` under `pagename == 'index'`.
374
- # Loading them site-wide added ~2k lines of CSS + a third-party
375
- # Google-Fonts request to every doc page for no benefit.
376
365
 
377
366
  # Favicon for the site
378
367
  html_favicon = "_static/braindecode_symbol.png"
@@ -480,29 +469,8 @@ latex_documents = [
480
469
  "manual",
481
470
  ),
482
471
  ]
483
- # Master/dev builds publish under /dev/ on GitHub Pages (see
484
- # .github/workflows/docs.yml `destination_dir: dev`). The baseurl,
485
- # OG canonical, and the sitemap location must match the actual deploy
486
- # path or crawlers will end up on 404s.
487
- html_baseurl = "https://braindecode.org/dev/"
472
+ html_baseurl = "https://braindecode.org"
488
473
  sitemap_filename = "sitemap.xml"
489
- # Flat URLs (no /en/{version}/) — same pattern as MOABB.
490
- sitemap_url_scheme = "{link}"
491
-
492
- # --- Open Graph / Twitter Card / meta description ---
493
- ogp_site_url = "https://braindecode.org/dev/"
494
- ogp_site_name = "Braindecode"
495
- ogp_image = "https://braindecode.org/dev/_static/braindecode_long.svg"
496
- ogp_image_alt = (
497
- "Braindecode — open-source PyTorch toolbox for decoding raw EEG, ECoG and MEG"
498
- )
499
- ogp_description_length = 200
500
- ogp_enable_meta_description = True
501
- ogp_type = "website"
502
- ogp_custom_meta_tags = [
503
- '<meta name="twitter:card" content="summary_large_image" />',
504
- '<meta name="twitter:site" content="@braindecode" />',
505
- ]
506
474
  # -- Fontawesome support -----------------------------------------------------
507
475
 
508
476
  # here the "fab" and "fas" refer to "brand" and "solid" (determines which font