Braindecode 1.3.2.dev182822510__tar.gz → 1.3.2.dev183191339__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 (163) hide show
  1. {braindecode-1.3.2.dev182822510/braindecode.egg-info → braindecode-1.3.2.dev183191339}/PKG-INFO +3 -3
  2. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/datasets/base.py +123 -1
  3. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/datasets/bids/hub.py +24 -9
  4. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/datasets/bids/hub_io.py +19 -4
  5. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/datautil/hub_formats.py +13 -7
  6. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/__init__.py +4 -0
  7. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/base.py +293 -104
  8. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/bendr.py +86 -25
  9. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/biot.py +23 -5
  10. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/cbramod.py +28 -6
  11. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/config.py +29 -29
  12. braindecode-1.3.2.dev183191339/braindecode/models/dgcnn.py +500 -0
  13. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/eegpt.py +15 -2
  14. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/eegsym.py +1 -1
  15. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/labram.py +15 -1
  16. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/luna.py +11 -21
  17. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/patchedtransformer.py +5 -3
  18. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/reve.py +59 -23
  19. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/shallow_fbcsp.py +16 -8
  20. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/signal_jepa.py +63 -13
  21. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/sstdpn.py +1 -1
  22. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/summary.csv +1 -0
  23. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/util.py +146 -13
  24. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/modules/__init__.py +2 -1
  25. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/modules/activation.py +20 -0
  26. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/modules/attention.py +2 -1
  27. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/preprocessing/mne_preprocess.py +2 -1
  28. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/preprocessing/preprocess.py +62 -32
  29. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/util.py +34 -4
  30. braindecode-1.3.2.dev183191339/braindecode/version.py +1 -0
  31. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339/braindecode.egg-info}/PKG-INFO +3 -3
  32. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode.egg-info/SOURCES.txt +1 -0
  33. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode.egg-info/requires.txt +2 -2
  34. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/docs/api.rst +11 -9
  35. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/docs/conf.py +18 -13
  36. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/docs/models/categorization/gnn.rst +9 -1
  37. braindecode-1.3.2.dev183191339/docs/models/categorization/spd.rst +103 -0
  38. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/docs/models/models_categorization.rst +60 -60
  39. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/docs/whats_new.rst +83 -7
  40. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/pyproject.toml +11 -2
  41. braindecode-1.3.2.dev182822510/braindecode/version.py +0 -1
  42. braindecode-1.3.2.dev182822510/docs/models/categorization/spd.rst +0 -35
  43. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/LICENSE.txt +0 -0
  44. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/MANIFEST.in +0 -0
  45. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/NOTICE.txt +0 -0
  46. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/README.rst +0 -0
  47. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/__init__.py +0 -0
  48. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/augmentation/__init__.py +0 -0
  49. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/augmentation/base.py +0 -0
  50. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/augmentation/functional.py +0 -0
  51. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/augmentation/transforms.py +0 -0
  52. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/classifier.py +0 -0
  53. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/datasets/__init__.py +0 -0
  54. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/datasets/bbci.py +0 -0
  55. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/datasets/bcicomp.py +0 -0
  56. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/datasets/bids/__init__.py +0 -0
  57. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/datasets/bids/datasets.py +0 -0
  58. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/datasets/bids/format.py +0 -0
  59. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/datasets/bids/hub_format.py +0 -0
  60. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/datasets/bids/hub_validation.py +0 -0
  61. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/datasets/bids/iterable.py +0 -0
  62. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/datasets/chb_mit.py +0 -0
  63. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/datasets/mne.py +0 -0
  64. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/datasets/moabb.py +0 -0
  65. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/datasets/nmt.py +0 -0
  66. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/datasets/registry.py +0 -0
  67. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/datasets/siena.py +0 -0
  68. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/datasets/sleep_physio_challe_18.py +0 -0
  69. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/datasets/sleep_physionet.py +0 -0
  70. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/datasets/tuh.py +0 -0
  71. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/datasets/utils.py +0 -0
  72. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/datasets/xy.py +0 -0
  73. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/datautil/__init__.py +0 -0
  74. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/datautil/channel_utils.py +0 -0
  75. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/datautil/serialization.py +0 -0
  76. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/datautil/util.py +0 -0
  77. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/eegneuralnet.py +0 -0
  78. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/functional/__init__.py +0 -0
  79. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/functional/functions.py +0 -0
  80. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/functional/initialization.py +0 -0
  81. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/atcnet.py +0 -0
  82. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/attentionbasenet.py +0 -0
  83. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/attn_sleep.py +0 -0
  84. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/brainmodule.py +0 -0
  85. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/contrawr.py +0 -0
  86. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/ctnet.py +0 -0
  87. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/deep4.py +0 -0
  88. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/deepsleepnet.py +0 -0
  89. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/eegconformer.py +0 -0
  90. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/eeginception_erp.py +0 -0
  91. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/eeginception_mi.py +0 -0
  92. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/eegitnet.py +0 -0
  93. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/eegminer.py +0 -0
  94. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/eegnet.py +0 -0
  95. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/eegnex.py +0 -0
  96. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/eegsimpleconv.py +0 -0
  97. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/eegtcnet.py +0 -0
  98. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/fbcnet.py +0 -0
  99. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/fblightconvnet.py +0 -0
  100. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/fbmsnet.py +0 -0
  101. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/hybrid.py +0 -0
  102. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/ifnet.py +0 -0
  103. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/medformer.py +0 -0
  104. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/msvtnet.py +0 -0
  105. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/sccnet.py +0 -0
  106. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/sinc_shallow.py +0 -0
  107. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/sleep_stager_blanco_2020.py +0 -0
  108. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/sleep_stager_chambon_2018.py +0 -0
  109. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/sparcnet.py +0 -0
  110. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/syncnet.py +0 -0
  111. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/tcn.py +0 -0
  112. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/tidnet.py +0 -0
  113. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/tsinception.py +0 -0
  114. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/models/usleep.py +0 -0
  115. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/modules/blocks.py +0 -0
  116. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/modules/convolution.py +0 -0
  117. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/modules/filter.py +0 -0
  118. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/modules/layers.py +0 -0
  119. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/modules/linear.py +0 -0
  120. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/modules/parametrization.py +0 -0
  121. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/modules/stats.py +0 -0
  122. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/modules/util.py +0 -0
  123. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/modules/wrapper.py +0 -0
  124. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/preprocessing/__init__.py +0 -0
  125. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/preprocessing/eegprep_preprocess.py +0 -0
  126. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/preprocessing/util.py +0 -0
  127. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/preprocessing/windowers.py +0 -0
  128. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/regressor.py +0 -0
  129. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/samplers/__init__.py +0 -0
  130. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/samplers/base.py +0 -0
  131. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/samplers/ssl.py +0 -0
  132. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/training/__init__.py +0 -0
  133. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/training/callbacks.py +0 -0
  134. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/training/losses.py +0 -0
  135. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/training/scoring.py +0 -0
  136. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/visualization/__init__.py +0 -0
  137. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/visualization/confusion_matrices.py +0 -0
  138. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode/visualization/gradients.py +0 -0
  139. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode.egg-info/dependency_links.txt +0 -0
  140. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/braindecode.egg-info/top_level.txt +0 -0
  141. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/docs/Makefile +0 -0
  142. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/docs/_templates/autosummary/class.rst +0 -0
  143. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/docs/_templates/autosummary/class_in_subdir.rst +0 -0
  144. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/docs/_templates/autosummary/function.rst +0 -0
  145. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/docs/_templates/autosummary/function_in_subdir.rst +0 -0
  146. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/docs/cite.rst +0 -0
  147. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/docs/help.rst +0 -0
  148. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/docs/index.rst +0 -0
  149. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/docs/install/install.rst +0 -0
  150. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/docs/install/install_pip.rst +0 -0
  151. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/docs/install/install_source.rst +0 -0
  152. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/docs/models/categorization/attention.rst +0 -0
  153. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/docs/models/categorization/channel.rst +0 -0
  154. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/docs/models/categorization/convolution.rst +0 -0
  155. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/docs/models/categorization/filterbank.rst +0 -0
  156. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/docs/models/categorization/interpretable.rst +0 -0
  157. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/docs/models/categorization/lbm.rst +0 -0
  158. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/docs/models/categorization/recurrent.rst +0 -0
  159. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/docs/models/models.rst +0 -0
  160. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/docs/models/models_table.rst +0 -0
  161. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/docs/models/models_visualization.rst +0 -0
  162. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/docs/sg_execution_times.rst +0 -0
  163. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183191339}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: braindecode
3
- Version: 1.3.2.dev182822510
3
+ Version: 1.3.2.dev183191339
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>
@@ -22,7 +22,7 @@ Requires-Python: >=3.11
22
22
  Description-Content-Type: text/x-rst
23
23
  License-File: LICENSE.txt
24
24
  License-File: NOTICE.txt
25
- Requires-Dist: torch>=2.2
25
+ Requires-Dist: torch>=2.0
26
26
  Requires-Dist: torchaudio>=2.0
27
27
  Requires-Dist: mne>=1.11.0
28
28
  Requires-Dist: pandas<3.0.0
@@ -35,7 +35,7 @@ Requires-Dist: wfdb
35
35
  Requires-Dist: linear_attention_transformer
36
36
  Requires-Dist: docstring_inheritance
37
37
  Requires-Dist: rotary_embedding_torch
38
- Requires-Dist: pandas<3.0.0
38
+ Requires-Dist: pydantic>=2.0
39
39
  Provides-Extra: moabb
40
40
  Requires-Dist: moabb>=1.4.3; extra == "moabb"
41
41
  Provides-Extra: eegprep
@@ -579,6 +579,89 @@ class EEGWindowsDataset(RecordDataset):
579
579
  self.metadata,
580
580
  )
581
581
 
582
+ def to_epochs_dataset(self) -> WindowsDataset:
583
+ """Converts this :class:`EEGWindowsDataset` to :class:`WindowsDataset` with ``mne.Epochs``.
584
+
585
+ In Braindecode, the data can either be stored as ``mne.io.Raw`` (in :class:`EEGWindowsDataset`)
586
+ or as ``mne.Epochs`` (in :class:`WindowsDataset`). This function converts from the first type to the second,
587
+ which can be useful for reducing disk space when you want to save a dataset.
588
+
589
+ Returns
590
+ -------
591
+ WindowsDataset
592
+ A new :class:`WindowsDataset` with ``mne.Epochs``.
593
+
594
+ Raises
595
+ ------
596
+ ValueError
597
+ If the dataset is not compatible with conversion. This includes:
598
+ - If targets are not obtained from metadata
599
+ - If windows have inconsistent sizes or there are no windows to convert
600
+ - If raw.first_samp!=0 (not supported for simplicity)
601
+ """
602
+ # Check the targets:
603
+ if self.targets_from != "metadata":
604
+ raise ValueError(
605
+ "to_epochs_dataset only works if targets are obtained from metadata."
606
+ )
607
+
608
+ # Check and get window sizes:
609
+ i_start_in_trial = self.crop_inds[:, 1]
610
+ i_stop_in_trial = self.crop_inds[:, 2]
611
+ sizes = np.unique(i_stop_in_trial - i_start_in_trial)
612
+ if len(sizes) > 1:
613
+ raise ValueError("Windows have inconsistent sizes.")
614
+ if len(sizes) != 1:
615
+ raise ValueError("No windows to convert.")
616
+ input_window_seconds = (sizes[0] - 1) / self.raw.info["sfreq"]
617
+
618
+ # Check raw.first_samp:
619
+ if self.raw.first_samp != 0:
620
+ raise ValueError(
621
+ f"to_epochs_dataset only works if raw.first_samp is 0, found {self.raw.first_samp=}"
622
+ )
623
+
624
+ # Create events and epochs:
625
+ events = np.zeros((len(self), 3), dtype=int)
626
+ events[:, 0] = i_start_in_trial
627
+ events[:, 2] = 1
628
+ epochs = mne.Epochs(
629
+ raw=self.raw,
630
+ events=events,
631
+ event_id={"window": 1},
632
+ tmin=0,
633
+ tmax=input_window_seconds,
634
+ metadata=self.metadata.copy(),
635
+ baseline=None,
636
+ )
637
+ # we skip dropping bads to be consistent with EEGWindowsDataset:
638
+ epochs._bad_dropped = True
639
+
640
+ # Populate new WindowsDataset:
641
+ windows = WindowsDataset(
642
+ epochs,
643
+ description=self.description,
644
+ transform=self.transform,
645
+ targets_from=self.targets_from,
646
+ last_target_only=self.last_target_only,
647
+ )
648
+
649
+ window_kwargs = list(getattr(self, "window_kwargs", []))
650
+ window_kwargs.append((self.to_epochs_dataset.__name__, {}))
651
+ setattr(windows, "window_kwargs", window_kwargs)
652
+ if hasattr(self, "raw_preproc_kwargs"):
653
+ setattr(
654
+ windows, "raw_preproc_kwargs", list(getattr(self, "raw_preproc_kwargs"))
655
+ )
656
+ if hasattr(self, "window_preproc_kwargs"):
657
+ setattr(
658
+ windows,
659
+ "window_preproc_kwargs",
660
+ list(getattr(self, "window_preproc_kwargs")),
661
+ )
662
+
663
+ return windows
664
+
582
665
 
583
666
  @register_dataset
584
667
  class WindowsDataset(RecordDataset):
@@ -732,7 +815,9 @@ class BaseConcatDataset(ConcatDataset, HubDatasetMixin, Generic[T]):
732
815
 
733
816
  def __init__(
734
817
  self,
735
- list_of_ds: list[T | BaseConcatDataset[T]],
818
+ list_of_ds: (
819
+ list[T] | list[BaseConcatDataset[T]] | list[T | BaseConcatDataset[T]]
820
+ ),
736
821
  target_transform: Callable | None = None,
737
822
  *,
738
823
  lazy: bool = False,
@@ -1309,3 +1394,40 @@ class BaseConcatDataset(ConcatDataset, HubDatasetMixin, Generic[T]):
1309
1394
 
1310
1395
  def _repr_html_(self):
1311
1396
  return self._build_repr().to_html()
1397
+
1398
+ def to_epochs_dataset(self) -> BaseConcatDataset[WindowsDataset]:
1399
+ """Converts this :class:`BaseConcatDataset` such that all datasets are :class:`WindowsDataset` with ``mne.Epochs``.
1400
+
1401
+ In Braindecode, the data can either be stored as ``mne.io.Raw`` (in :class:`EEGWindowsDataset`)
1402
+ or as ``mne.Epochs`` (in :class:`WindowsDataset`). This function converts all the underlying datasets to
1403
+ :class:`WindowsDataset` with ``mne.Epochs``.
1404
+ This can be useful for reducing disk space when you want to save a dataset.
1405
+
1406
+ Returns
1407
+ -------
1408
+ BaseConcatDataset[WindowsDataset]
1409
+ A new :class:`BaseConcatDataset` where all datasets are :class:`WindowsDataset` with ``mne.Epochs``.
1410
+
1411
+ Raises
1412
+ ------
1413
+ ValueError
1414
+ If any of the underlying datasets is a :class:`RawDataset` or any other type that is not
1415
+ :class:`EEGWindowsDataset` or :class:`WindowsDataset`, as they cannot be converted to epochs.
1416
+ """
1417
+ datasets = self.datasets
1418
+ if not all(
1419
+ isinstance(ds, (EEGWindowsDataset, WindowsDataset)) for ds in datasets
1420
+ ):
1421
+ raise ValueError(
1422
+ "All datasets must be EEGWindowsDataset or WindowsDataset to convert to WindowsDataset."
1423
+ )
1424
+ new_datasets: list[WindowsDataset] = []
1425
+ for ds in datasets:
1426
+ if isinstance(ds, EEGWindowsDataset):
1427
+ new_ds = ds.to_epochs_dataset()
1428
+ new_datasets.append(new_ds)
1429
+ elif isinstance(ds, WindowsDataset):
1430
+ new_datasets.append(ds)
1431
+ return BaseConcatDataset(
1432
+ new_datasets, target_transform=self.target_transform, lazy=self._lazy
1433
+ )
@@ -103,7 +103,7 @@ class HubDatasetMixin:
103
103
  compression: str = "blosc",
104
104
  compression_level: int = 5,
105
105
  pipeline_name: str = "braindecode",
106
- chunk_size: int = 10000,
106
+ chunk_size: int = 5_000_000,
107
107
  local_cache_dir: str | Path | None = None,
108
108
  **kwargs,
109
109
  ) -> str:
@@ -129,10 +129,13 @@ class HubDatasetMixin:
129
129
  Compression level (0-9). Level 5 provides optimal balance.
130
130
  pipeline_name : str, default="braindecode"
131
131
  Name of the processing pipeline for BIDS sourcedata.
132
- chunk_size : int, default=10000
133
- Number of samples per chunk in Zarr. Larger chunk size will create fewer
134
- but larger files. Only used for RawDataset and EEGWindowsDataset (continuous data).
135
- With WindowsDataset (pre-cut epochs), each window is saved as a separate chunk.
132
+ chunk_size : int, default=5_000_000
133
+ Number of samples per chunk in Zarr along the time/window dimension.
134
+ Larger chunk sizes create fewer but larger chunks/files. This parameter
135
+ is used for both continuous data (e.g., RawDataset, EEGWindowsDataset)
136
+ and pre-cut windows (WindowsDataset). For WindowsDataset, multiple
137
+ windows may be stored in a single chunk depending on their duration
138
+ and the chosen ``chunk_size``.
136
139
  local_cache_dir : str | Path | None
137
140
  Local directory to use for temporary files during upload. If None, uses
138
141
  the system temp directory and cleans it up after upload. If provided,
@@ -657,7 +660,7 @@ class HubDatasetMixin:
657
660
  output_path: Path,
658
661
  compression: str,
659
662
  compression_level: int,
660
- chunk_size: int = 10000,
663
+ chunk_size: int = 5_000_000,
661
664
  ) -> None:
662
665
  """Convert dataset to Zarr format (inline implementation)."""
663
666
 
@@ -723,7 +726,14 @@ class HubDatasetMixin:
723
726
 
724
727
  # Save using inlined function
725
728
  _save_windows_to_zarr(
726
- grp, data, metadata, description, info_dict, compressor, target_name
729
+ grp,
730
+ data,
731
+ metadata,
732
+ description,
733
+ info_dict,
734
+ compressor,
735
+ target_name,
736
+ chunk_size,
727
737
  )
728
738
 
729
739
  elif dataset_type == "EEGWindowsDataset":
@@ -835,11 +845,16 @@ class HubDatasetMixin:
835
845
 
836
846
  # Convert to MNE objects and create dataset
837
847
  info = Info.from_json_dict(info_dict)
848
+ targets = metadata["target"].values
849
+ if np.issubdtype(targets.dtype, np.integer):
850
+ event_ids = targets
851
+ else:
852
+ event_ids = np.ones(len(metadata), dtype=int)
838
853
  events = np.column_stack(
839
854
  [
840
- metadata["i_start_in_trial"].values,
855
+ metadata["i_start_in_trial"].values.astype(int),
841
856
  np.zeros(len(metadata), dtype=int),
842
- metadata["target"].values,
857
+ event_ids,
843
858
  ]
844
859
  )
845
860
  epochs = mne.EpochsArray(data, info, events=events, metadata=metadata)
@@ -45,16 +45,25 @@ def _restore_nan_from_json(obj):
45
45
 
46
46
 
47
47
  def _save_windows_to_zarr(
48
- grp, data, metadata, description, info, compressor, target_name
48
+ grp, data, metadata, description, info, compressor, target_name, chunk_size
49
49
  ):
50
50
  """Save windowed data to Zarr group (low-level function)."""
51
51
  data_array = data.astype(np.float32)
52
52
  compressors_list = [compressor] if compressor is not None else None
53
53
 
54
+ max_windows_per_chunk = max(
55
+ 1, chunk_size // (data_array.shape[1] * data_array.shape[2])
56
+ )
57
+ n_windows_per_chunk = min(data_array.shape[0], max_windows_per_chunk)
58
+
54
59
  grp.create_array(
55
60
  "data",
56
61
  data=data_array,
57
- chunks=(1, data_array.shape[1], data_array.shape[2]),
62
+ chunks=(
63
+ n_windows_per_chunk,
64
+ data_array.shape[1],
65
+ data_array.shape[2],
66
+ ),
58
67
  compressors=compressors_list,
59
68
  )
60
69
 
@@ -85,10 +94,13 @@ def _save_eegwindows_to_zarr(
85
94
  continuous_float = continuous_data.astype(np.float32)
86
95
  compressors_list = [compressor] if compressor is not None else None
87
96
 
97
+ max_samples_per_chunk = max(1, chunk_size // continuous_float.shape[0])
98
+ n_samples_per_chunk = min(continuous_float.shape[1], max_samples_per_chunk)
99
+
88
100
  grp.create_array(
89
101
  "data",
90
102
  data=continuous_float,
91
- chunks=(continuous_float.shape[0], min(chunk_size, continuous_float.shape[1])),
103
+ chunks=(continuous_float.shape[0], n_samples_per_chunk),
92
104
  compressors=compressors_list,
93
105
  )
94
106
 
@@ -157,10 +169,13 @@ def _save_raw_to_zarr(grp, raw, description, info, target_name, compressor, chun
157
169
  continuous_float = continuous_data.astype(np.float32)
158
170
  compressors_list = [compressor] if compressor is not None else None
159
171
 
172
+ max_samples_per_chunk = max(1, chunk_size // continuous_float.shape[0])
173
+ n_samples_per_chunk = min(continuous_float.shape[1], max_samples_per_chunk)
174
+
160
175
  grp.create_array(
161
176
  "data",
162
177
  data=continuous_float,
163
- chunks=(continuous_float.shape[0], min(chunk_size, continuous_float.shape[1])),
178
+ chunks=(continuous_float.shape[0], n_samples_per_chunk),
164
179
  compressors=compressors_list,
165
180
  )
166
181
 
@@ -36,7 +36,7 @@ def convert_to_zarr(
36
36
  output_path: Union[str, Path],
37
37
  compression: str = "blosc",
38
38
  compression_level: int = 5,
39
- chunk_size: int = 10000,
39
+ chunk_size: int = 5_000_000,
40
40
  overwrite: bool = False,
41
41
  ) -> Path:
42
42
  """Convert BaseConcatDataset to Zarr format.
@@ -59,10 +59,13 @@ def convert_to_zarr(
59
59
  blosc uses zstd codec by default, providing best balance of speed and compression.
60
60
  compression_level : int, default=5
61
61
  Compression level (0-9). Level 5 provides optimal balance based on benchmarks.
62
- chunk_size : int, default=10000
63
- Number of samples per chunk in Zarr. Larger chunk size will create fewer
64
- but larger files. Only used for RawDataset and EEGWindowsDataset (continuous data).
65
- With WindowsDataset (pre-cut epochs), each window is saved as a separate chunk.
62
+ chunk_size : int, default=5_000_000
63
+ Target chunk size for Zarr storage.
64
+ For continuous data (e.g., RawDataset, EEGWindowsDataset), this is interpreted
65
+ as the approximate number of samples per chunk; larger values create fewer but
66
+ larger chunks on disk.
67
+ For pre-cut windowed data (WindowsDataset), this controls how many windows are
68
+ grouped together in each chunk (i.e., multiple windows can be stored per chunk).
66
69
  overwrite : bool, default=False
67
70
  Whether to overwrite existing directory.
68
71
 
@@ -74,8 +77,11 @@ def convert_to_zarr(
74
77
  Notes
75
78
  -----
76
79
  The chunking strategy is optimized for random access:
77
- - Windowed data: Each window is a separate chunk (1, n_channels, n_times)
78
- - Raw data: Chunks of (n_channels, 10000) samples
80
+ - Windowed data: Windows are stored in chunks of shape
81
+ (n_windows_in_chunk, n_channels, n_times), where n_windows_in_chunk is
82
+ determined by ``chunk_size``.
83
+ - Raw / continuous data: Time is split into chunks of approximately
84
+ ``chunk_size`` samples (per channel), e.g., (n_channels, n_times_per_chunk).
79
85
 
80
86
  Examples
81
87
  --------
@@ -12,6 +12,7 @@ from .contrawr import ContraWR
12
12
  from .ctnet import CTNet
13
13
  from .deep4 import Deep4Net
14
14
  from .deepsleepnet import DeepSleepNet
15
+ from .dgcnn import DGCNN
15
16
  from .eegconformer import EEGConformer
16
17
  from .eeginception_erp import EEGInceptionERP
17
18
  from .eeginception_mi import EEGInceptionMI
@@ -54,6 +55,7 @@ from .tsinception import TSception
54
55
  from .usleep import USleep
55
56
  from .util import (
56
57
  _init_models_dict,
58
+ build_model_config,
57
59
  extract_channel_locations_from_chs_info,
58
60
  models_mandatory_parameters,
59
61
  )
@@ -87,6 +89,7 @@ __all__ = [
87
89
  "EEGSym",
88
90
  "EEGSimpleConv",
89
91
  "EEGTCNet",
92
+ "DGCNN",
90
93
  "FBCNet",
91
94
  "FBLightConvNet",
92
95
  "FBMSNet",
@@ -116,6 +119,7 @@ __all__ = [
116
119
  "TIDNet",
117
120
  "TSception",
118
121
  "USleep",
122
+ "build_model_config",
119
123
  "_init_models_dict",
120
124
  "models_mandatory_parameters",
121
125
  ]