Braindecode 1.3.2.dev182544824__tar.gz → 1.3.2.dev182822510__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.dev182544824/braindecode.egg-info → braindecode-1.3.2.dev182822510}/PKG-INFO +3 -3
  2. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/datasets/base.py +1 -123
  3. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/datasets/bids/hub.py +9 -24
  4. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/datasets/bids/hub_io.py +4 -19
  5. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/datautil/hub_formats.py +7 -13
  6. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/__init__.py +0 -4
  7. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/base.py +91 -147
  8. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/bendr.py +19 -69
  9. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/cbramod.py +5 -19
  10. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/config.py +29 -29
  11. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/eegsym.py +1 -1
  12. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/luna.py +7 -8
  13. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/patchedtransformer.py +3 -5
  14. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/reve.py +3 -23
  15. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/shallow_fbcsp.py +8 -16
  16. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/sstdpn.py +1 -1
  17. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/summary.csv +0 -1
  18. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/util.py +13 -146
  19. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/modules/__init__.py +1 -2
  20. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/modules/activation.py +0 -20
  21. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/modules/attention.py +1 -2
  22. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/preprocessing/mne_preprocess.py +1 -2
  23. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/preprocessing/preprocess.py +32 -62
  24. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/util.py +4 -34
  25. braindecode-1.3.2.dev182822510/braindecode/version.py +1 -0
  26. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510/braindecode.egg-info}/PKG-INFO +3 -3
  27. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode.egg-info/SOURCES.txt +0 -1
  28. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode.egg-info/requires.txt +2 -2
  29. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/docs/api.rst +9 -11
  30. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/docs/conf.py +6 -18
  31. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/docs/models/categorization/gnn.rst +1 -9
  32. braindecode-1.3.2.dev182822510/docs/models/categorization/spd.rst +35 -0
  33. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/docs/models/models_categorization.rst +60 -60
  34. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/docs/whats_new.rst +7 -56
  35. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/pyproject.toml +2 -11
  36. braindecode-1.3.2.dev182544824/braindecode/models/dgcnn.py +0 -500
  37. braindecode-1.3.2.dev182544824/braindecode/version.py +0 -1
  38. braindecode-1.3.2.dev182544824/docs/models/categorization/spd.rst +0 -103
  39. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/LICENSE.txt +0 -0
  40. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/MANIFEST.in +0 -0
  41. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/NOTICE.txt +0 -0
  42. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/README.rst +0 -0
  43. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/__init__.py +0 -0
  44. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/augmentation/__init__.py +0 -0
  45. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/augmentation/base.py +0 -0
  46. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/augmentation/functional.py +0 -0
  47. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/augmentation/transforms.py +0 -0
  48. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/classifier.py +0 -0
  49. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/datasets/__init__.py +0 -0
  50. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/datasets/bbci.py +0 -0
  51. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/datasets/bcicomp.py +0 -0
  52. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/datasets/bids/__init__.py +0 -0
  53. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/datasets/bids/datasets.py +0 -0
  54. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/datasets/bids/format.py +0 -0
  55. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/datasets/bids/hub_format.py +0 -0
  56. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/datasets/bids/hub_validation.py +0 -0
  57. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/datasets/bids/iterable.py +0 -0
  58. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/datasets/chb_mit.py +0 -0
  59. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/datasets/mne.py +0 -0
  60. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/datasets/moabb.py +0 -0
  61. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/datasets/nmt.py +0 -0
  62. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/datasets/registry.py +0 -0
  63. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/datasets/siena.py +0 -0
  64. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/datasets/sleep_physio_challe_18.py +0 -0
  65. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/datasets/sleep_physionet.py +0 -0
  66. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/datasets/tuh.py +0 -0
  67. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/datasets/utils.py +0 -0
  68. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/datasets/xy.py +0 -0
  69. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/datautil/__init__.py +0 -0
  70. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/datautil/channel_utils.py +0 -0
  71. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/datautil/serialization.py +0 -0
  72. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/datautil/util.py +0 -0
  73. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/eegneuralnet.py +0 -0
  74. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/functional/__init__.py +0 -0
  75. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/functional/functions.py +0 -0
  76. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/functional/initialization.py +0 -0
  77. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/atcnet.py +0 -0
  78. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/attentionbasenet.py +0 -0
  79. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/attn_sleep.py +0 -0
  80. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/biot.py +0 -0
  81. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/brainmodule.py +0 -0
  82. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/contrawr.py +0 -0
  83. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/ctnet.py +0 -0
  84. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/deep4.py +0 -0
  85. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/deepsleepnet.py +0 -0
  86. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/eegconformer.py +0 -0
  87. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/eeginception_erp.py +0 -0
  88. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/eeginception_mi.py +0 -0
  89. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/eegitnet.py +0 -0
  90. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/eegminer.py +0 -0
  91. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/eegnet.py +0 -0
  92. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/eegnex.py +0 -0
  93. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/eegpt.py +0 -0
  94. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/eegsimpleconv.py +0 -0
  95. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/eegtcnet.py +0 -0
  96. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/fbcnet.py +0 -0
  97. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/fblightconvnet.py +0 -0
  98. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/fbmsnet.py +0 -0
  99. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/hybrid.py +0 -0
  100. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/ifnet.py +0 -0
  101. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/labram.py +0 -0
  102. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/medformer.py +0 -0
  103. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/msvtnet.py +0 -0
  104. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/sccnet.py +0 -0
  105. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/signal_jepa.py +0 -0
  106. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/sinc_shallow.py +0 -0
  107. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/sleep_stager_blanco_2020.py +0 -0
  108. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/sleep_stager_chambon_2018.py +0 -0
  109. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/sparcnet.py +0 -0
  110. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/syncnet.py +0 -0
  111. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/tcn.py +0 -0
  112. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/tidnet.py +0 -0
  113. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/tsinception.py +0 -0
  114. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/models/usleep.py +0 -0
  115. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/modules/blocks.py +0 -0
  116. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/modules/convolution.py +0 -0
  117. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/modules/filter.py +0 -0
  118. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/modules/layers.py +0 -0
  119. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/modules/linear.py +0 -0
  120. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/modules/parametrization.py +0 -0
  121. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/modules/stats.py +0 -0
  122. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/modules/util.py +0 -0
  123. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/modules/wrapper.py +0 -0
  124. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/preprocessing/__init__.py +0 -0
  125. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/preprocessing/eegprep_preprocess.py +0 -0
  126. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/preprocessing/util.py +0 -0
  127. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/preprocessing/windowers.py +0 -0
  128. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/regressor.py +0 -0
  129. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/samplers/__init__.py +0 -0
  130. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/samplers/base.py +0 -0
  131. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/samplers/ssl.py +0 -0
  132. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/training/__init__.py +0 -0
  133. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/training/callbacks.py +0 -0
  134. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/training/losses.py +0 -0
  135. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/training/scoring.py +0 -0
  136. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/visualization/__init__.py +0 -0
  137. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/visualization/confusion_matrices.py +0 -0
  138. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode/visualization/gradients.py +0 -0
  139. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode.egg-info/dependency_links.txt +0 -0
  140. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/braindecode.egg-info/top_level.txt +0 -0
  141. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/docs/Makefile +0 -0
  142. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/docs/_templates/autosummary/class.rst +0 -0
  143. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/docs/_templates/autosummary/class_in_subdir.rst +0 -0
  144. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/docs/_templates/autosummary/function.rst +0 -0
  145. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/docs/_templates/autosummary/function_in_subdir.rst +0 -0
  146. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/docs/cite.rst +0 -0
  147. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/docs/help.rst +0 -0
  148. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/docs/index.rst +0 -0
  149. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/docs/install/install.rst +0 -0
  150. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/docs/install/install_pip.rst +0 -0
  151. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/docs/install/install_source.rst +0 -0
  152. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/docs/models/categorization/attention.rst +0 -0
  153. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/docs/models/categorization/channel.rst +0 -0
  154. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/docs/models/categorization/convolution.rst +0 -0
  155. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/docs/models/categorization/filterbank.rst +0 -0
  156. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/docs/models/categorization/interpretable.rst +0 -0
  157. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/docs/models/categorization/lbm.rst +0 -0
  158. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/docs/models/categorization/recurrent.rst +0 -0
  159. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/docs/models/models.rst +0 -0
  160. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/docs/models/models_table.rst +0 -0
  161. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/docs/models/models_visualization.rst +0 -0
  162. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/docs/sg_execution_times.rst +0 -0
  163. {braindecode-1.3.2.dev182544824 → braindecode-1.3.2.dev182822510}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: braindecode
3
- Version: 1.3.2.dev182544824
3
+ Version: 1.3.2.dev182822510
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.0
25
+ Requires-Dist: torch>=2.2
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: pydantic>=2.0
38
+ Requires-Dist: pandas<3.0.0
39
39
  Provides-Extra: moabb
40
40
  Requires-Dist: moabb>=1.4.3; extra == "moabb"
41
41
  Provides-Extra: eegprep
@@ -579,89 +579,6 @@ 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
-
665
582
 
666
583
  @register_dataset
667
584
  class WindowsDataset(RecordDataset):
@@ -815,9 +732,7 @@ class BaseConcatDataset(ConcatDataset, HubDatasetMixin, Generic[T]):
815
732
 
816
733
  def __init__(
817
734
  self,
818
- list_of_ds: (
819
- list[T] | list[BaseConcatDataset[T]] | list[T | BaseConcatDataset[T]]
820
- ),
735
+ list_of_ds: list[T | BaseConcatDataset[T]],
821
736
  target_transform: Callable | None = None,
822
737
  *,
823
738
  lazy: bool = False,
@@ -1394,40 +1309,3 @@ class BaseConcatDataset(ConcatDataset, HubDatasetMixin, Generic[T]):
1394
1309
 
1395
1310
  def _repr_html_(self):
1396
1311
  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 = 5_000_000,
106
+ chunk_size: int = 10000,
107
107
  local_cache_dir: str | Path | None = None,
108
108
  **kwargs,
109
109
  ) -> str:
@@ -129,13 +129,10 @@ 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=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``.
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.
139
136
  local_cache_dir : str | Path | None
140
137
  Local directory to use for temporary files during upload. If None, uses
141
138
  the system temp directory and cleans it up after upload. If provided,
@@ -660,7 +657,7 @@ class HubDatasetMixin:
660
657
  output_path: Path,
661
658
  compression: str,
662
659
  compression_level: int,
663
- chunk_size: int = 5_000_000,
660
+ chunk_size: int = 10000,
664
661
  ) -> None:
665
662
  """Convert dataset to Zarr format (inline implementation)."""
666
663
 
@@ -726,14 +723,7 @@ class HubDatasetMixin:
726
723
 
727
724
  # Save using inlined function
728
725
  _save_windows_to_zarr(
729
- grp,
730
- data,
731
- metadata,
732
- description,
733
- info_dict,
734
- compressor,
735
- target_name,
736
- chunk_size,
726
+ grp, data, metadata, description, info_dict, compressor, target_name
737
727
  )
738
728
 
739
729
  elif dataset_type == "EEGWindowsDataset":
@@ -845,16 +835,11 @@ class HubDatasetMixin:
845
835
 
846
836
  # Convert to MNE objects and create dataset
847
837
  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)
853
838
  events = np.column_stack(
854
839
  [
855
- metadata["i_start_in_trial"].values.astype(int),
840
+ metadata["i_start_in_trial"].values,
856
841
  np.zeros(len(metadata), dtype=int),
857
- event_ids,
842
+ metadata["target"].values,
858
843
  ]
859
844
  )
860
845
  epochs = mne.EpochsArray(data, info, events=events, metadata=metadata)
@@ -45,25 +45,16 @@ 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, chunk_size
48
+ grp, data, metadata, description, info, compressor, target_name
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
-
59
54
  grp.create_array(
60
55
  "data",
61
56
  data=data_array,
62
- chunks=(
63
- n_windows_per_chunk,
64
- data_array.shape[1],
65
- data_array.shape[2],
66
- ),
57
+ chunks=(1, data_array.shape[1], data_array.shape[2]),
67
58
  compressors=compressors_list,
68
59
  )
69
60
 
@@ -94,13 +85,10 @@ def _save_eegwindows_to_zarr(
94
85
  continuous_float = continuous_data.astype(np.float32)
95
86
  compressors_list = [compressor] if compressor is not None else None
96
87
 
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
-
100
88
  grp.create_array(
101
89
  "data",
102
90
  data=continuous_float,
103
- chunks=(continuous_float.shape[0], n_samples_per_chunk),
91
+ chunks=(continuous_float.shape[0], min(chunk_size, continuous_float.shape[1])),
104
92
  compressors=compressors_list,
105
93
  )
106
94
 
@@ -169,13 +157,10 @@ def _save_raw_to_zarr(grp, raw, description, info, target_name, compressor, chun
169
157
  continuous_float = continuous_data.astype(np.float32)
170
158
  compressors_list = [compressor] if compressor is not None else None
171
159
 
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
-
175
160
  grp.create_array(
176
161
  "data",
177
162
  data=continuous_float,
178
- chunks=(continuous_float.shape[0], n_samples_per_chunk),
163
+ chunks=(continuous_float.shape[0], min(chunk_size, continuous_float.shape[1])),
179
164
  compressors=compressors_list,
180
165
  )
181
166
 
@@ -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 = 5_000_000,
39
+ chunk_size: int = 10000,
40
40
  overwrite: bool = False,
41
41
  ) -> Path:
42
42
  """Convert BaseConcatDataset to Zarr format.
@@ -59,13 +59,10 @@ 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=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).
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.
69
66
  overwrite : bool, default=False
70
67
  Whether to overwrite existing directory.
71
68
 
@@ -77,11 +74,8 @@ def convert_to_zarr(
77
74
  Notes
78
75
  -----
79
76
  The chunking strategy is optimized for random access:
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).
77
+ - Windowed data: Each window is a separate chunk (1, n_channels, n_times)
78
+ - Raw data: Chunks of (n_channels, 10000) samples
85
79
 
86
80
  Examples
87
81
  --------
@@ -12,7 +12,6 @@ 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
16
15
  from .eegconformer import EEGConformer
17
16
  from .eeginception_erp import EEGInceptionERP
18
17
  from .eeginception_mi import EEGInceptionMI
@@ -55,7 +54,6 @@ from .tsinception import TSception
55
54
  from .usleep import USleep
56
55
  from .util import (
57
56
  _init_models_dict,
58
- build_model_config,
59
57
  extract_channel_locations_from_chs_info,
60
58
  models_mandatory_parameters,
61
59
  )
@@ -89,7 +87,6 @@ __all__ = [
89
87
  "EEGSym",
90
88
  "EEGSimpleConv",
91
89
  "EEGTCNet",
92
- "DGCNN",
93
90
  "FBCNet",
94
91
  "FBLightConvNet",
95
92
  "FBMSNet",
@@ -119,7 +116,6 @@ __all__ = [
119
116
  "TIDNet",
120
117
  "TSception",
121
118
  "USleep",
122
- "build_model_config",
123
119
  "_init_models_dict",
124
120
  "models_mandatory_parameters",
125
121
  ]