braindecode 0.5__tar.gz → 0.5.1__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 (187) hide show
  1. {Braindecode-0.5 → Braindecode-0.5.1}/Braindecode.egg-info/PKG-INFO +14 -13
  2. {Braindecode-0.5 → Braindecode-0.5.1}/Braindecode.egg-info/SOURCES.txt +68 -18
  3. {Braindecode-0.5 → Braindecode-0.5.1}/Braindecode.egg-info/top_level.txt +1 -0
  4. {Braindecode-0.5 → Braindecode-0.5.1}/PKG-INFO +14 -13
  5. {Braindecode-0.5 → Braindecode-0.5.1}/README.rst +13 -12
  6. {Braindecode-0.5 → Braindecode-0.5.1}/braindecode/classifier.py +72 -2
  7. {Braindecode-0.5 → Braindecode-0.5.1}/braindecode/datasets/__init__.py +2 -3
  8. Braindecode-0.5.1/braindecode/datasets/base.py +293 -0
  9. {Braindecode-0.5 → Braindecode-0.5.1}/braindecode/datasets/bbci.py +13 -2
  10. Braindecode-0.5.1/braindecode/datasets/sleep_physionet.py +103 -0
  11. Braindecode-0.5.1/braindecode/datasets/tuh.py +230 -0
  12. Braindecode-0.5.1/braindecode/datautil/__init__.py +11 -0
  13. {Braindecode-0.5/braindecode/datasets → Braindecode-0.5.1/braindecode/datautil}/mne.py +2 -2
  14. Braindecode-0.5.1/braindecode/datautil/preprocess.py +364 -0
  15. Braindecode-0.5.1/braindecode/datautil/serialization.py +111 -0
  16. Braindecode-0.5.1/braindecode/datautil/windowers.py +435 -0
  17. {Braindecode-0.5/braindecode/datasets → Braindecode-0.5.1/braindecode/datautil}/xy.py +3 -3
  18. {Braindecode-0.5 → Braindecode-0.5.1}/braindecode/models/__init__.py +3 -0
  19. {Braindecode-0.5 → Braindecode-0.5.1}/braindecode/models/eegnet.py +3 -1
  20. {Braindecode-0.5 → Braindecode-0.5.1}/braindecode/models/eegresnet.py +8 -9
  21. Braindecode-0.5.1/braindecode/models/sleep_stager_chambon_2018.py +113 -0
  22. Braindecode-0.5.1/braindecode/models/tcn.py +143 -0
  23. {Braindecode-0.5 → Braindecode-0.5.1}/braindecode/models/util.py +1 -1
  24. {Braindecode-0.5 → Braindecode-0.5.1}/braindecode/regressor.py +55 -2
  25. Braindecode-0.5.1/braindecode/samplers/__init__.py +5 -0
  26. Braindecode-0.5.1/braindecode/samplers/base.py +78 -0
  27. Braindecode-0.5.1/braindecode/samplers/ssl.py +118 -0
  28. {Braindecode-0.5 → Braindecode-0.5.1}/braindecode/training/losses.py +4 -2
  29. {Braindecode-0.5 → Braindecode-0.5.1}/braindecode/training/scoring.py +19 -7
  30. {Braindecode-0.5 → Braindecode-0.5.1}/braindecode/util.py +35 -2
  31. Braindecode-0.5.1/braindecode/version.py +1 -0
  32. {Braindecode-0.5 → Braindecode-0.5.1}/braindecode/visualization/__init__.py +2 -0
  33. {Braindecode-0.5 → Braindecode-0.5.1}/braindecode/visualization/gradients.py +18 -7
  34. {Braindecode-0.5 → Braindecode-0.5.1}/docs/Makefile +5 -0
  35. {Braindecode-0.5/docs/auto_examples → Braindecode-0.5.1/docs/_build/html/_downloads/1224801107d6c3b138edf8ee33de0561}/plot_bcic_iv_2a_moabb_cropped.ipynb +13 -13
  36. {Braindecode-0.5 → Braindecode-0.5.1}/docs/_build/html/_downloads/176a7695926ccfe061692c4af12b673d/plot_dataset_example.ipynb +5 -5
  37. {Braindecode-0.5/docs/auto_examples → Braindecode-0.5.1/docs/_build/html/_downloads/25408d8d92a873e370d4750ba414b84a}/benchmark_lazy_eager_loading.ipynb +2 -2
  38. Braindecode-0.5.1/docs/_build/html/_downloads/3e0455c88adcaa2571230abb981020db/plot_relative_positioning.ipynb +375 -0
  39. Braindecode-0.5.1/docs/_build/html/_downloads/4855a497085ac8dc60a648bf4a72d647/plot_load_save_datasets.ipynb +180 -0
  40. {Braindecode-0.5/docs/auto_examples → Braindecode-0.5.1/docs/_build/html/_downloads/49b1f19a86467aeaf762a1550583a845}/plot_custom_dataset_example.ipynb +3 -3
  41. Braindecode-0.5.1/docs/_build/html/_downloads/5bafba0488197e377d459780399abb29/plot_sleep_staging.ipynb +293 -0
  42. {Braindecode-0.5/docs/auto_examples → Braindecode-0.5.1/docs/_build/html/_downloads/748680401b0360239d00624375dd9587}/plot_bcic_iv_2a_moabb_trial.ipynb +15 -15
  43. Braindecode-0.5.1/docs/_build/html/_downloads/8c06a965e21b52d199f98636388aaa21/tuh_eeg_corpus.ipynb +180 -0
  44. {Braindecode-0.5/docs/auto_examples → Braindecode-0.5.1/docs/_build/html/_downloads/9c64c2c15907a661b1fe2d7dd209a434}/plot_regression.ipynb +2 -2
  45. Braindecode-0.5.1/docs/_build/html/_downloads/b38e40c9ee338673865922575e84fd7f/plot_split_dataset.ipynb +162 -0
  46. {Braindecode-0.5/docs/auto_examples → Braindecode-0.5.1/docs/_build/html/_downloads/e42b5bd97033be02521040b0d5ee21c3}/plot_mne_dataset_example.ipynb +3 -3
  47. {Braindecode-0.5 → Braindecode-0.5.1}/docs/api.rst +41 -4
  48. {Braindecode-0.5/docs/_build/html/_downloads/25408d8d92a873e370d4750ba414b84a → Braindecode-0.5.1/docs/auto_examples}/benchmark_lazy_eager_loading.ipynb +2 -2
  49. {Braindecode-0.5 → Braindecode-0.5.1}/docs/auto_examples/benchmark_lazy_eager_loading.rst +42 -7
  50. {Braindecode-0.5 → Braindecode-0.5.1}/docs/auto_examples/index.rst +116 -4
  51. {Braindecode-0.5/docs/_build/html/_downloads/1224801107d6c3b138edf8ee33de0561 → Braindecode-0.5.1/docs/auto_examples}/plot_bcic_iv_2a_moabb_cropped.ipynb +13 -13
  52. Braindecode-0.5.1/docs/auto_examples/plot_bcic_iv_2a_moabb_cropped.rst +845 -0
  53. {Braindecode-0.5/docs/_build/html/_downloads/748680401b0360239d00624375dd9587 → Braindecode-0.5.1/docs/auto_examples}/plot_bcic_iv_2a_moabb_trial.ipynb +15 -15
  54. Braindecode-0.5.1/docs/auto_examples/plot_bcic_iv_2a_moabb_trial.rst +764 -0
  55. {Braindecode-0.5/docs/_build/html/_downloads/49b1f19a86467aeaf762a1550583a845 → Braindecode-0.5.1/docs/auto_examples}/plot_custom_dataset_example.ipynb +3 -3
  56. Braindecode-0.5.1/docs/auto_examples/plot_custom_dataset_example.rst +261 -0
  57. {Braindecode-0.5 → Braindecode-0.5.1}/docs/auto_examples/plot_dataset_example.ipynb +5 -5
  58. Braindecode-0.5.1/docs/auto_examples/plot_dataset_example.rst +741 -0
  59. Braindecode-0.5.1/docs/auto_examples/plot_load_save_datasets.ipynb +180 -0
  60. Braindecode-0.5.1/docs/auto_examples/plot_load_save_datasets.rst +315 -0
  61. {Braindecode-0.5/docs/_build/html/_downloads/e42b5bd97033be02521040b0d5ee21c3 → Braindecode-0.5.1/docs/auto_examples}/plot_mne_dataset_example.ipynb +3 -3
  62. Braindecode-0.5.1/docs/auto_examples/plot_mne_dataset_example.rst +355 -0
  63. {Braindecode-0.5/docs/_build/html/_downloads/9c64c2c15907a661b1fe2d7dd209a434 → Braindecode-0.5.1/docs/auto_examples}/plot_regression.ipynb +2 -2
  64. {Braindecode-0.5 → Braindecode-0.5.1}/docs/auto_examples/plot_regression.rst +103 -14
  65. Braindecode-0.5.1/docs/auto_examples/plot_relative_positioning.ipynb +375 -0
  66. Braindecode-0.5.1/docs/auto_examples/plot_relative_positioning.rst +1004 -0
  67. Braindecode-0.5.1/docs/auto_examples/plot_sleep_staging.ipynb +293 -0
  68. Braindecode-0.5.1/docs/auto_examples/plot_sleep_staging.rst +670 -0
  69. Braindecode-0.5.1/docs/auto_examples/plot_split_dataset.ipynb +162 -0
  70. Braindecode-0.5.1/docs/auto_examples/plot_split_dataset.rst +393 -0
  71. Braindecode-0.5.1/docs/auto_examples/sg_execution_times.rst +34 -0
  72. Braindecode-0.5.1/docs/auto_examples/tuh_eeg_corpus.ipynb +180 -0
  73. Braindecode-0.5.1/docs/auto_examples/tuh_eeg_corpus.rst +350 -0
  74. {Braindecode-0.5 → Braindecode-0.5.1}/docs/conf.py +6 -2
  75. {Braindecode-0.5 → Braindecode-0.5.1}/docs/generated/braindecode.classifier.EEGClassifier.rst +1 -1
  76. {Braindecode-0.5 → Braindecode-0.5.1}/docs/generated/braindecode.datasets.BaseConcatDataset.rst +1 -1
  77. {Braindecode-0.5 → Braindecode-0.5.1}/docs/generated/braindecode.datasets.BaseDataset.rst +1 -1
  78. {Braindecode-0.5 → Braindecode-0.5.1}/docs/generated/braindecode.datasets.MOABBDataset.rst +1 -1
  79. Braindecode-0.5.1/docs/generated/braindecode.datasets.SleepPhysionet.rst +14 -0
  80. Braindecode-0.5.1/docs/generated/braindecode.datasets.TUH.rst +14 -0
  81. Braindecode-0.5.1/docs/generated/braindecode.datasets.TUHAbnormal.rst +14 -0
  82. {Braindecode-0.5 → Braindecode-0.5.1}/docs/generated/braindecode.datasets.WindowsDataset.rst +1 -1
  83. Braindecode-0.5.1/docs/generated/braindecode.datautil.Preprocessor.rst +14 -0
  84. {Braindecode-0.5 → Braindecode-0.5.1}/docs/generated/braindecode.datautil.create_fixed_length_windows.rst +1 -1
  85. Braindecode-0.5.1/docs/generated/braindecode.datautil.create_from_X_y.rst +12 -0
  86. Braindecode-0.5.1/docs/generated/braindecode.datautil.create_from_mne_epochs.rst +12 -0
  87. Braindecode-0.5.1/docs/generated/braindecode.datautil.create_from_mne_raw.rst +12 -0
  88. {Braindecode-0.5 → Braindecode-0.5.1}/docs/generated/braindecode.datautil.create_windows_from_events.rst +1 -1
  89. {Braindecode-0.5 → Braindecode-0.5.1}/docs/generated/braindecode.datautil.exponential_moving_demean.rst +1 -1
  90. {Braindecode-0.5 → Braindecode-0.5.1}/docs/generated/braindecode.datautil.exponential_moving_standardize.rst +1 -1
  91. Braindecode-0.5.1/docs/generated/braindecode.datautil.filterbank.rst +12 -0
  92. Braindecode-0.5.1/docs/generated/braindecode.datautil.load_concat_dataset.rst +12 -0
  93. Braindecode-0.5.1/docs/generated/braindecode.datautil.preprocess.rst +12 -0
  94. Braindecode-0.5.1/docs/generated/braindecode.datautil.save_concat_dataset.rst +12 -0
  95. {Braindecode-0.5 → Braindecode-0.5.1}/docs/generated/braindecode.datautil.scale.rst +1 -1
  96. {Braindecode-0.5 → Braindecode-0.5.1}/docs/generated/braindecode.datautil.zscore.rst +1 -1
  97. {Braindecode-0.5 → Braindecode-0.5.1}/docs/generated/braindecode.models.Deep4Net.rst +1 -1
  98. {Braindecode-0.5 → Braindecode-0.5.1}/docs/generated/braindecode.models.EEGNetv1.rst +1 -1
  99. {Braindecode-0.5 → Braindecode-0.5.1}/docs/generated/braindecode.models.EEGNetv4.rst +1 -1
  100. {Braindecode-0.5 → Braindecode-0.5.1}/docs/generated/braindecode.models.EEGResNet.rst +1 -1
  101. {Braindecode-0.5 → Braindecode-0.5.1}/docs/generated/braindecode.models.HybridNet.rst +1 -1
  102. {Braindecode-0.5 → Braindecode-0.5.1}/docs/generated/braindecode.models.ShallowFBCSPNet.rst +1 -1
  103. Braindecode-0.5.1/docs/generated/braindecode.models.SleepStagerChambon2018.rst +14 -0
  104. Braindecode-0.5.1/docs/generated/braindecode.models.TCN.rst +14 -0
  105. Braindecode-0.5.1/docs/generated/braindecode.models.get_output_shape.rst +12 -0
  106. {Braindecode-0.5 → Braindecode-0.5.1}/docs/generated/braindecode.regressor.EEGRegressor.rst +1 -1
  107. Braindecode-0.5.1/docs/generated/braindecode.samplers.RecordingSampler.rst +14 -0
  108. Braindecode-0.5.1/docs/generated/braindecode.samplers.RelativePositioningSampler.rst +14 -0
  109. {Braindecode-0.5 → Braindecode-0.5.1}/docs/generated/braindecode.training.CroppedLoss.rst +1 -1
  110. {Braindecode-0.5 → Braindecode-0.5.1}/docs/generated/braindecode.training.CroppedTrialEpochScoring.rst +1 -1
  111. {Braindecode-0.5 → Braindecode-0.5.1}/docs/generated/braindecode.training.PostEpochTrainScoring.rst +1 -1
  112. {Braindecode-0.5 → Braindecode-0.5.1}/docs/generated/braindecode.training.trial_preds_from_window_preds.rst +1 -1
  113. {Braindecode-0.5 → Braindecode-0.5.1}/docs/generated/braindecode.util.set_random_seeds.rst +1 -1
  114. Braindecode-0.5.1/docs/generated/braindecode.visualization.compute_amplitude_gradients.rst +12 -0
  115. {Braindecode-0.5 → Braindecode-0.5.1}/docs/index.rst +15 -5
  116. Braindecode-0.5.1/docs/whats_new.rst +70 -0
  117. Braindecode-0.5.1/test/acceptance_tests/test_cropped_decoding.py +171 -0
  118. Braindecode-0.5.1/test/acceptance_tests/test_eeg_classifier.py +255 -0
  119. Braindecode-0.5.1/test/acceptance_tests/test_model_architectures.py +54 -0
  120. Braindecode-0.5.1/test/acceptance_tests/test_trialwise_decoding.py +168 -0
  121. Braindecode-0.5.1/test/unit_tests/__init__.py +0 -0
  122. Braindecode-0.5.1/test/unit_tests/datasets/__init__.py +0 -0
  123. Braindecode-0.5.1/test/unit_tests/datasets/test_dataset.py +227 -0
  124. Braindecode-0.5.1/test/unit_tests/datasets/test_mne.py +145 -0
  125. Braindecode-0.5.1/test/unit_tests/datasets/test_sleep_physionet.py +23 -0
  126. Braindecode-0.5.1/test/unit_tests/datasets/test_tuh.py +97 -0
  127. Braindecode-0.5.1/test/unit_tests/datasets/test_xy.py +31 -0
  128. Braindecode-0.5.1/test/unit_tests/datautil/__init__.py +0 -0
  129. Braindecode-0.5.1/test/unit_tests/datautil/test_preprocess.py +270 -0
  130. Braindecode-0.5.1/test/unit_tests/datautil/test_serialization.py +127 -0
  131. Braindecode-0.5.1/test/unit_tests/datautil/test_windowers.py +519 -0
  132. Braindecode-0.5.1/test/unit_tests/models/__init__.py +0 -0
  133. Braindecode-0.5.1/test/unit_tests/models/test_models.py +136 -0
  134. Braindecode-0.5.1/test/unit_tests/models/test_util.py +22 -0
  135. Braindecode-0.5.1/test/unit_tests/test_eeg_classifier.py +73 -0
  136. Braindecode-0.5.1/test/unit_tests/test_eeg_regressor.py +72 -0
  137. Braindecode-0.5.1/test/unit_tests/test_scoring.py +282 -0
  138. Braindecode-0.5.1/test/unit_tests/test_util.py +30 -0
  139. Braindecode-0.5.1/test/unit_tests/visualization/__init__.py +0 -0
  140. Braindecode-0.5.1/test/unit_tests/visualization/test_gradients.py +38 -0
  141. Braindecode-0.5/braindecode/datasets/base.py +0 -140
  142. Braindecode-0.5/braindecode/datasets/tuh.py +0 -113
  143. Braindecode-0.5/braindecode/datautil/__init__.py +0 -6
  144. Braindecode-0.5/braindecode/datautil/preprocess.py +0 -253
  145. Braindecode-0.5/braindecode/datautil/windowers.py +0 -315
  146. Braindecode-0.5/braindecode/experiments/bcic_iv_2a/config.py +0 -119
  147. Braindecode-0.5/braindecode/experiments/bcic_iv_2a/run.py +0 -230
  148. Braindecode-0.5/braindecode/version.py +0 -1
  149. Braindecode-0.5/docs/auto_examples/plot_bcic_iv_2a_moabb_cropped.rst +0 -523
  150. Braindecode-0.5/docs/auto_examples/plot_bcic_iv_2a_moabb_trial.rst +0 -441
  151. Braindecode-0.5/docs/auto_examples/plot_custom_dataset_example.rst +0 -130
  152. Braindecode-0.5/docs/auto_examples/plot_dataset_example.rst +0 -411
  153. Braindecode-0.5/docs/auto_examples/plot_mne_dataset_example.rst +0 -139
  154. Braindecode-0.5/docs/auto_examples/sg_execution_times.rst +0 -24
  155. Braindecode-0.5/docs/generated/braindecode.datasets.create_from_X_y.rst +0 -12
  156. Braindecode-0.5/docs/generated/braindecode.datasets.create_from_mne_epochs.rst +0 -12
  157. Braindecode-0.5/docs/generated/braindecode.datasets.create_from_mne_raw.rst +0 -12
  158. Braindecode-0.5/docs/notebooks/Untitled.ipynb +0 -334
  159. Braindecode-0.5/docs/source/braindecode.datasets.rst +0 -51
  160. Braindecode-0.5/docs/source/braindecode.datautil.rst +0 -75
  161. Braindecode-0.5/docs/source/braindecode.experiments.bcic_iv_2a.rst +0 -27
  162. Braindecode-0.5/docs/source/braindecode.experiments.rst +0 -14
  163. Braindecode-0.5/docs/source/braindecode.models.rst +0 -75
  164. Braindecode-0.5/docs/source/braindecode.rst +0 -78
  165. Braindecode-0.5/docs/source/braindecode.visualization.rst +0 -51
  166. Braindecode-0.5/docs/source/modules.rst +0 -7
  167. {Braindecode-0.5 → Braindecode-0.5.1}/Braindecode.egg-info/dependency_links.txt +0 -0
  168. {Braindecode-0.5 → Braindecode-0.5.1}/Braindecode.egg-info/not-zip-safe +0 -0
  169. {Braindecode-0.5 → Braindecode-0.5.1}/Braindecode.egg-info/requires.txt +2 -2
  170. {Braindecode-0.5 → Braindecode-0.5.1}/LICENSE.txt +0 -0
  171. {Braindecode-0.5 → Braindecode-0.5.1}/MANIFEST.in +0 -0
  172. {Braindecode-0.5 → Braindecode-0.5.1}/braindecode/__init__.py +0 -0
  173. {Braindecode-0.5 → Braindecode-0.5.1}/braindecode/datasets/moabb.py +0 -0
  174. {Braindecode-0.5 → Braindecode-0.5.1}/braindecode/datautil/util.py +0 -0
  175. {Braindecode-0.5 → Braindecode-0.5.1}/braindecode/models/deep4.py +0 -0
  176. {Braindecode-0.5 → Braindecode-0.5.1}/braindecode/models/functions.py +0 -0
  177. {Braindecode-0.5 → Braindecode-0.5.1}/braindecode/models/hybrid.py +0 -0
  178. {Braindecode-0.5 → Braindecode-0.5.1}/braindecode/models/modules.py +0 -0
  179. {Braindecode-0.5 → Braindecode-0.5.1}/braindecode/models/shallow_fbcsp.py +0 -0
  180. {Braindecode-0.5 → Braindecode-0.5.1}/braindecode/training/__init__.py +0 -0
  181. {Braindecode-0.5 → Braindecode-0.5.1}/braindecode/training/callbacks.py +0 -0
  182. {Braindecode-0.5 → Braindecode-0.5.1}/docs/_templates/autosummary/class.rst +0 -0
  183. {Braindecode-0.5 → Braindecode-0.5.1}/docs/_templates/autosummary/function.rst +0 -0
  184. {Braindecode-0.5 → Braindecode-0.5.1}/setup.cfg +0 -0
  185. {Braindecode-0.5 → Braindecode-0.5.1}/setup.py +0 -0
  186. {Braindecode-0.5/braindecode/experiments → Braindecode-0.5.1/test}/__init__.py +0 -0
  187. {Braindecode-0.5/braindecode/experiments/bcic_iv_2a → Braindecode-0.5.1/test/acceptance_tests}/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: Braindecode
3
- Version: 0.5
3
+ Version: 0.5.1
4
4
  Summary: A deep learning toolbox to decode raw time-domain EEG.
5
5
  Home-page: https://github.com/braindecode/braindecode
6
6
  Author: Robin Tibor Schirrmeister
@@ -13,8 +13,8 @@ Description: Braindecode
13
13
  :alt: Join the chat at https://gitter.im/braindecodechat/community
14
14
  :target: https://gitter.im/braindecodechat/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
15
15
 
16
- .. image:: https://travis-ci.org/braindecode/braindecode.svg?branch=master
17
- :target: https://travis-ci.org/braindecode/braindecode
16
+ .. image:: https://github.com/braindecode/braindecode/workflows/tests-and-docs/badge.svg
17
+ :target: https://github.com/braindecode/braindecode/actions
18
18
 
19
19
  .. image:: https://circleci.com/gh/braindecode/braindecode.svg?style=svg
20
20
  :target: https://circleci.com/gh/braindecode/braindecode
@@ -36,7 +36,13 @@ Description: Braindecode
36
36
 
37
37
  1. Install pytorch from http://pytorch.org/ (you don't need to install torchvision).
38
38
 
39
- 2. Install latest release of braindecode via pip:
39
+ 2. Install `MOABB <https://github.com/NeuroTechX/moabb>`_ via pip (needed if you want to use MOABB datasets utilities):
40
+
41
+ .. code-block:: bash
42
+
43
+ pip install moabb
44
+
45
+ 3. Install latest release of braindecode via pip:
40
46
 
41
47
  .. code-block:: bash
42
48
 
@@ -46,16 +52,11 @@ Description: Braindecode
46
52
 
47
53
  .. code-block:: bash
48
54
 
49
- curl -O https://raw.githubusercontent.com/braindecode/braindecode/master/environment.yml
50
- conda env create -f environment.yml
51
- conda activate braindecode
52
-
53
- .. note::
54
- The latest development version of mne-python is currently required for
55
- improvements to lazy loading performance. (commit 3989f998c5f974ed37e97fa3e6c8ead0f5a1cb2a).
55
+ curl -O https://raw.githubusercontent.com/braindecode/braindecode/master/environment.yml
56
+ conda env create -f environment.yml
57
+ conda activate braindecode
56
58
 
57
- Install the latest version of braindecode via pip:
58
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
59
+ alternatively, install the latest version of braindecode via pip:
59
60
 
60
61
  .. code-block:: bash
61
62
 
@@ -17,18 +17,16 @@ braindecode/version.py
17
17
  braindecode/datasets/__init__.py
18
18
  braindecode/datasets/base.py
19
19
  braindecode/datasets/bbci.py
20
- braindecode/datasets/mne.py
21
20
  braindecode/datasets/moabb.py
21
+ braindecode/datasets/sleep_physionet.py
22
22
  braindecode/datasets/tuh.py
23
- braindecode/datasets/xy.py
24
23
  braindecode/datautil/__init__.py
24
+ braindecode/datautil/mne.py
25
25
  braindecode/datautil/preprocess.py
26
+ braindecode/datautil/serialization.py
26
27
  braindecode/datautil/util.py
27
28
  braindecode/datautil/windowers.py
28
- braindecode/experiments/__init__.py
29
- braindecode/experiments/bcic_iv_2a/__init__.py
30
- braindecode/experiments/bcic_iv_2a/config.py
31
- braindecode/experiments/bcic_iv_2a/run.py
29
+ braindecode/datautil/xy.py
32
30
  braindecode/models/__init__.py
33
31
  braindecode/models/deep4.py
34
32
  braindecode/models/eegnet.py
@@ -37,7 +35,12 @@ braindecode/models/functions.py
37
35
  braindecode/models/hybrid.py
38
36
  braindecode/models/modules.py
39
37
  braindecode/models/shallow_fbcsp.py
38
+ braindecode/models/sleep_stager_chambon_2018.py
39
+ braindecode/models/tcn.py
40
40
  braindecode/models/util.py
41
+ braindecode/samplers/__init__.py
42
+ braindecode/samplers/base.py
43
+ braindecode/samplers/ssl.py
41
44
  braindecode/training/__init__.py
42
45
  braindecode/training/callbacks.py
43
46
  braindecode/training/losses.py
@@ -48,12 +51,18 @@ docs/Makefile
48
51
  docs/api.rst
49
52
  docs/conf.py
50
53
  docs/index.rst
54
+ docs/whats_new.rst
51
55
  docs/_build/html/_downloads/1224801107d6c3b138edf8ee33de0561/plot_bcic_iv_2a_moabb_cropped.ipynb
52
56
  docs/_build/html/_downloads/176a7695926ccfe061692c4af12b673d/plot_dataset_example.ipynb
53
57
  docs/_build/html/_downloads/25408d8d92a873e370d4750ba414b84a/benchmark_lazy_eager_loading.ipynb
58
+ docs/_build/html/_downloads/3e0455c88adcaa2571230abb981020db/plot_relative_positioning.ipynb
59
+ docs/_build/html/_downloads/4855a497085ac8dc60a648bf4a72d647/plot_load_save_datasets.ipynb
54
60
  docs/_build/html/_downloads/49b1f19a86467aeaf762a1550583a845/plot_custom_dataset_example.ipynb
61
+ docs/_build/html/_downloads/5bafba0488197e377d459780399abb29/plot_sleep_staging.ipynb
55
62
  docs/_build/html/_downloads/748680401b0360239d00624375dd9587/plot_bcic_iv_2a_moabb_trial.ipynb
63
+ docs/_build/html/_downloads/8c06a965e21b52d199f98636388aaa21/tuh_eeg_corpus.ipynb
56
64
  docs/_build/html/_downloads/9c64c2c15907a661b1fe2d7dd209a434/plot_regression.ipynb
65
+ docs/_build/html/_downloads/b38e40c9ee338673865922575e84fd7f/plot_split_dataset.ipynb
57
66
  docs/_build/html/_downloads/e42b5bd97033be02521040b0d5ee21c3/plot_mne_dataset_example.ipynb
58
67
  docs/_templates/autosummary/class.rst
59
68
  docs/_templates/autosummary/function.rst
@@ -68,23 +77,41 @@ docs/auto_examples/plot_custom_dataset_example.ipynb
68
77
  docs/auto_examples/plot_custom_dataset_example.rst
69
78
  docs/auto_examples/plot_dataset_example.ipynb
70
79
  docs/auto_examples/plot_dataset_example.rst
80
+ docs/auto_examples/plot_load_save_datasets.ipynb
81
+ docs/auto_examples/plot_load_save_datasets.rst
71
82
  docs/auto_examples/plot_mne_dataset_example.ipynb
72
83
  docs/auto_examples/plot_mne_dataset_example.rst
73
84
  docs/auto_examples/plot_regression.ipynb
74
85
  docs/auto_examples/plot_regression.rst
86
+ docs/auto_examples/plot_relative_positioning.ipynb
87
+ docs/auto_examples/plot_relative_positioning.rst
88
+ docs/auto_examples/plot_sleep_staging.ipynb
89
+ docs/auto_examples/plot_sleep_staging.rst
90
+ docs/auto_examples/plot_split_dataset.ipynb
91
+ docs/auto_examples/plot_split_dataset.rst
75
92
  docs/auto_examples/sg_execution_times.rst
93
+ docs/auto_examples/tuh_eeg_corpus.ipynb
94
+ docs/auto_examples/tuh_eeg_corpus.rst
76
95
  docs/generated/braindecode.classifier.EEGClassifier.rst
77
96
  docs/generated/braindecode.datasets.BaseConcatDataset.rst
78
97
  docs/generated/braindecode.datasets.BaseDataset.rst
79
98
  docs/generated/braindecode.datasets.MOABBDataset.rst
99
+ docs/generated/braindecode.datasets.SleepPhysionet.rst
100
+ docs/generated/braindecode.datasets.TUH.rst
101
+ docs/generated/braindecode.datasets.TUHAbnormal.rst
80
102
  docs/generated/braindecode.datasets.WindowsDataset.rst
81
- docs/generated/braindecode.datasets.create_from_X_y.rst
82
- docs/generated/braindecode.datasets.create_from_mne_epochs.rst
83
- docs/generated/braindecode.datasets.create_from_mne_raw.rst
103
+ docs/generated/braindecode.datautil.Preprocessor.rst
84
104
  docs/generated/braindecode.datautil.create_fixed_length_windows.rst
105
+ docs/generated/braindecode.datautil.create_from_X_y.rst
106
+ docs/generated/braindecode.datautil.create_from_mne_epochs.rst
107
+ docs/generated/braindecode.datautil.create_from_mne_raw.rst
85
108
  docs/generated/braindecode.datautil.create_windows_from_events.rst
86
109
  docs/generated/braindecode.datautil.exponential_moving_demean.rst
87
110
  docs/generated/braindecode.datautil.exponential_moving_standardize.rst
111
+ docs/generated/braindecode.datautil.filterbank.rst
112
+ docs/generated/braindecode.datautil.load_concat_dataset.rst
113
+ docs/generated/braindecode.datautil.preprocess.rst
114
+ docs/generated/braindecode.datautil.save_concat_dataset.rst
88
115
  docs/generated/braindecode.datautil.scale.rst
89
116
  docs/generated/braindecode.datautil.zscore.rst
90
117
  docs/generated/braindecode.models.Deep4Net.rst
@@ -93,18 +120,41 @@ docs/generated/braindecode.models.EEGNetv4.rst
93
120
  docs/generated/braindecode.models.EEGResNet.rst
94
121
  docs/generated/braindecode.models.HybridNet.rst
95
122
  docs/generated/braindecode.models.ShallowFBCSPNet.rst
123
+ docs/generated/braindecode.models.SleepStagerChambon2018.rst
124
+ docs/generated/braindecode.models.TCN.rst
125
+ docs/generated/braindecode.models.get_output_shape.rst
96
126
  docs/generated/braindecode.regressor.EEGRegressor.rst
127
+ docs/generated/braindecode.samplers.RecordingSampler.rst
128
+ docs/generated/braindecode.samplers.RelativePositioningSampler.rst
97
129
  docs/generated/braindecode.training.CroppedLoss.rst
98
130
  docs/generated/braindecode.training.CroppedTrialEpochScoring.rst
99
131
  docs/generated/braindecode.training.PostEpochTrainScoring.rst
100
132
  docs/generated/braindecode.training.trial_preds_from_window_preds.rst
101
133
  docs/generated/braindecode.util.set_random_seeds.rst
102
- docs/notebooks/Untitled.ipynb
103
- docs/source/braindecode.datasets.rst
104
- docs/source/braindecode.datautil.rst
105
- docs/source/braindecode.experiments.bcic_iv_2a.rst
106
- docs/source/braindecode.experiments.rst
107
- docs/source/braindecode.models.rst
108
- docs/source/braindecode.rst
109
- docs/source/braindecode.visualization.rst
110
- docs/source/modules.rst
134
+ docs/generated/braindecode.visualization.compute_amplitude_gradients.rst
135
+ test/__init__.py
136
+ test/acceptance_tests/__init__.py
137
+ test/acceptance_tests/test_cropped_decoding.py
138
+ test/acceptance_tests/test_eeg_classifier.py
139
+ test/acceptance_tests/test_model_architectures.py
140
+ test/acceptance_tests/test_trialwise_decoding.py
141
+ test/unit_tests/__init__.py
142
+ test/unit_tests/test_eeg_classifier.py
143
+ test/unit_tests/test_eeg_regressor.py
144
+ test/unit_tests/test_scoring.py
145
+ test/unit_tests/test_util.py
146
+ test/unit_tests/datasets/__init__.py
147
+ test/unit_tests/datasets/test_dataset.py
148
+ test/unit_tests/datasets/test_mne.py
149
+ test/unit_tests/datasets/test_sleep_physionet.py
150
+ test/unit_tests/datasets/test_tuh.py
151
+ test/unit_tests/datasets/test_xy.py
152
+ test/unit_tests/datautil/__init__.py
153
+ test/unit_tests/datautil/test_preprocess.py
154
+ test/unit_tests/datautil/test_serialization.py
155
+ test/unit_tests/datautil/test_windowers.py
156
+ test/unit_tests/models/__init__.py
157
+ test/unit_tests/models/test_models.py
158
+ test/unit_tests/models/test_util.py
159
+ test/unit_tests/visualization/__init__.py
160
+ test/unit_tests/visualization/test_gradients.py
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: Braindecode
3
- Version: 0.5
3
+ Version: 0.5.1
4
4
  Summary: A deep learning toolbox to decode raw time-domain EEG.
5
5
  Home-page: https://github.com/braindecode/braindecode
6
6
  Author: Robin Tibor Schirrmeister
@@ -13,8 +13,8 @@ Description: Braindecode
13
13
  :alt: Join the chat at https://gitter.im/braindecodechat/community
14
14
  :target: https://gitter.im/braindecodechat/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
15
15
 
16
- .. image:: https://travis-ci.org/braindecode/braindecode.svg?branch=master
17
- :target: https://travis-ci.org/braindecode/braindecode
16
+ .. image:: https://github.com/braindecode/braindecode/workflows/tests-and-docs/badge.svg
17
+ :target: https://github.com/braindecode/braindecode/actions
18
18
 
19
19
  .. image:: https://circleci.com/gh/braindecode/braindecode.svg?style=svg
20
20
  :target: https://circleci.com/gh/braindecode/braindecode
@@ -36,7 +36,13 @@ Description: Braindecode
36
36
 
37
37
  1. Install pytorch from http://pytorch.org/ (you don't need to install torchvision).
38
38
 
39
- 2. Install latest release of braindecode via pip:
39
+ 2. Install `MOABB <https://github.com/NeuroTechX/moabb>`_ via pip (needed if you want to use MOABB datasets utilities):
40
+
41
+ .. code-block:: bash
42
+
43
+ pip install moabb
44
+
45
+ 3. Install latest release of braindecode via pip:
40
46
 
41
47
  .. code-block:: bash
42
48
 
@@ -46,16 +52,11 @@ Description: Braindecode
46
52
 
47
53
  .. code-block:: bash
48
54
 
49
- curl -O https://raw.githubusercontent.com/braindecode/braindecode/master/environment.yml
50
- conda env create -f environment.yml
51
- conda activate braindecode
52
-
53
- .. note::
54
- The latest development version of mne-python is currently required for
55
- improvements to lazy loading performance. (commit 3989f998c5f974ed37e97fa3e6c8ead0f5a1cb2a).
55
+ curl -O https://raw.githubusercontent.com/braindecode/braindecode/master/environment.yml
56
+ conda env create -f environment.yml
57
+ conda activate braindecode
56
58
 
57
- Install the latest version of braindecode via pip:
58
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
59
+ alternatively, install the latest version of braindecode via pip:
59
60
 
60
61
  .. code-block:: bash
61
62
 
@@ -5,8 +5,8 @@ Braindecode
5
5
  :alt: Join the chat at https://gitter.im/braindecodechat/community
6
6
  :target: https://gitter.im/braindecodechat/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
7
7
 
8
- .. image:: https://travis-ci.org/braindecode/braindecode.svg?branch=master
9
- :target: https://travis-ci.org/braindecode/braindecode
8
+ .. image:: https://github.com/braindecode/braindecode/workflows/tests-and-docs/badge.svg
9
+ :target: https://github.com/braindecode/braindecode/actions
10
10
 
11
11
  .. image:: https://circleci.com/gh/braindecode/braindecode.svg?style=svg
12
12
  :target: https://circleci.com/gh/braindecode/braindecode
@@ -28,7 +28,13 @@ Installation
28
28
 
29
29
  1. Install pytorch from http://pytorch.org/ (you don't need to install torchvision).
30
30
 
31
- 2. Install latest release of braindecode via pip:
31
+ 2. Install `MOABB <https://github.com/NeuroTechX/moabb>`_ via pip (needed if you want to use MOABB datasets utilities):
32
+
33
+ .. code-block:: bash
34
+
35
+ pip install moabb
36
+
37
+ 3. Install latest release of braindecode via pip:
32
38
 
33
39
  .. code-block:: bash
34
40
 
@@ -38,16 +44,11 @@ alternatively, if you use conda, you could create a dedicated environment with t
38
44
 
39
45
  .. code-block:: bash
40
46
 
41
- curl -O https://raw.githubusercontent.com/braindecode/braindecode/master/environment.yml
42
- conda env create -f environment.yml
43
- conda activate braindecode
44
-
45
- .. note::
46
- The latest development version of mne-python is currently required for
47
- improvements to lazy loading performance. (commit 3989f998c5f974ed37e97fa3e6c8ead0f5a1cb2a).
47
+ curl -O https://raw.githubusercontent.com/braindecode/braindecode/master/environment.yml
48
+ conda env create -f environment.yml
49
+ conda activate braindecode
48
50
 
49
- Install the latest version of braindecode via pip:
50
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
51
+ alternatively, install the latest version of braindecode via pip:
51
52
 
52
53
  .. code-block:: bash
53
54
 
@@ -3,7 +3,7 @@ from sklearn.metrics import get_scorer
3
3
  from skorch.callbacks import EpochTimer, BatchScoring, PrintLog, EpochScoring
4
4
  from skorch.classifier import NeuralNet
5
5
  from skorch.classifier import NeuralNetClassifier
6
- from skorch.utils import train_loss_score, valid_loss_score, noop
6
+ from skorch.utils import train_loss_score, valid_loss_score, noop, to_numpy
7
7
 
8
8
  from .training.scoring import PostEpochTrainScoring, CroppedTrialEpochScoring
9
9
  from .util import ThrowAwayIndexLoader, update_estimator_docstring
@@ -153,7 +153,7 @@ class EEGClassifier(NeuralNetClassifier):
153
153
  for X, y, i in self.get_iterator(dataset, drop_index=False):
154
154
  i_window_in_trials.append(i[0].cpu().numpy())
155
155
  i_window_stops.append(i[2].cpu().numpy())
156
- preds.append(self.predict_proba(X))
156
+ preds.append(to_numpy(self.forward(X)))
157
157
  window_ys.append(y.cpu().numpy())
158
158
  preds = np.concatenate(preds)
159
159
  i_window_in_trials = np.concatenate(i_window_in_trials)
@@ -186,3 +186,73 @@ class EEGClassifier(NeuralNetClassifier):
186
186
  ),
187
187
  ("print_log", PrintLog()),
188
188
  ]
189
+
190
+ def predict_proba(self, X):
191
+ """Return the output of the module's forward method as a numpy
192
+ array. In case of cropped decoding returns averaged values for
193
+ each trial.
194
+
195
+ If the module's forward method returns multiple outputs as a
196
+ tuple, it is assumed that the first output contains the
197
+ relevant information and the other values are ignored.
198
+ If all values are relevant or module's output for each crop
199
+ is needed, consider using :func:`~skorch.NeuralNet.forward`
200
+ instead.
201
+
202
+ Parameters
203
+ ----------
204
+ X : input data, compatible with skorch.dataset.Dataset
205
+ By default, you should be able to pass:
206
+
207
+ * numpy arrays
208
+ * torch tensors
209
+ * pandas DataFrame or Series
210
+ * scipy sparse CSR matrices
211
+ * a dictionary of the former three
212
+ * a list/tuple of the former three
213
+ * a Dataset
214
+
215
+ If this doesn't work with your data, you have to pass a
216
+ ``Dataset`` that can deal with the data.
217
+
218
+ Returns
219
+ -------
220
+ y_proba : numpy ndarray
221
+
222
+ """
223
+ y_pred = super().predict_proba(X)
224
+ # Normally, we have to average the predictions across crops/timesteps
225
+ # to get one prediction per window/trial
226
+ # Predictions may be already averaged in CroppedTrialEpochScoring (y_pred.shape==2).
227
+ # However, when predictions are computed outside of CroppedTrialEpochScoring
228
+ # we have to average predictions, hence the check if len(y_pred.shape) == 3
229
+ if self.cropped and len(y_pred.shape) == 3:
230
+ return y_pred.mean(axis=-1)
231
+ else:
232
+ return y_pred
233
+
234
+ def predict(self, X):
235
+ """Return class labels for samples in X.
236
+
237
+ Parameters
238
+ ----------
239
+ X : input data, compatible with skorch.dataset.Dataset
240
+ By default, you should be able to pass:
241
+
242
+ * numpy arrays
243
+ * torch tensors
244
+ * pandas DataFrame or Series
245
+ * scipy sparse CSR matrices
246
+ * a dictionary of the former three
247
+ * a list/tuple of the former three
248
+ * a Dataset
249
+
250
+ If this doesn't work with your data, you have to pass a
251
+ ``Dataset`` that can deal with the data.
252
+
253
+ Returns
254
+ -------
255
+ y_pred : numpy ndarray
256
+
257
+ """
258
+ return self.predict_proba(X).argmax(1)
@@ -3,6 +3,5 @@ Loader code for some datasets.
3
3
  """
4
4
  from .base import WindowsDataset, BaseDataset, BaseConcatDataset
5
5
  from .moabb import MOABBDataset
6
- from .tuh import TUHAbnormal
7
- from .mne import create_from_mne_raw, create_from_mne_epochs
8
- from .xy import create_from_X_y
6
+ from .tuh import TUH, TUHAbnormal
7
+ from .sleep_physionet import SleepPhysionet