eegdash 0.2.1.dev178237806__py3-none-any.whl → 0.3.0__py3-none-any.whl

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.

Potentially problematic release.


This version of eegdash might be problematic. Click here for more details.

eegdash/__init__.py CHANGED
@@ -5,4 +5,4 @@ from .utils import __init__mongo_client
5
5
  __init__mongo_client()
6
6
 
7
7
  __all__ = ["EEGDash", "EEGDashDataset", "EEGChallengeDataset"]
8
- __version__ = "0.2.1.dev178237806"
8
+ __version__ = "0.3.0"
eegdash/api.py CHANGED
@@ -34,8 +34,6 @@ class EEGDash:
34
34
 
35
35
  """
36
36
 
37
- AWS_BUCKET = "s3://openneuro.org"
38
-
39
37
  def __init__(self, *, is_public: bool = True, is_staging: bool = False) -> None:
40
38
  """Create new instance of the EEGDash Database client.
41
39
 
eegdash/data_utils.py CHANGED
@@ -14,9 +14,7 @@ from bids import BIDSLayout
14
14
  from joblib import Parallel, delayed
15
15
  from mne._fiff.utils import _read_segments_file
16
16
  from mne.io import BaseRaw
17
- from mne_bids import (
18
- BIDSPath,
19
- )
17
+ from mne_bids import BIDSPath
20
18
 
21
19
  from braindecode.datasets import BaseDataset
22
20
 
@@ -30,7 +28,7 @@ class EEGDashBaseDataset(BaseDataset):
30
28
  conjunction with the preprocessing and training pipelines of braindecode.
31
29
  """
32
30
 
33
- AWS_BUCKET = "s3://openneuro.org"
31
+ _AWS_BUCKET = "s3://openneuro.org"
34
32
 
35
33
  def __init__(
36
34
  self,
@@ -64,7 +62,7 @@ class EEGDashBaseDataset(BaseDataset):
64
62
  suffix="eeg",
65
63
  **bids_kwargs,
66
64
  )
67
- self.s3_bucket = s3_bucket if s3_bucket else self.AWS_BUCKET
65
+ self.s3_bucket = s3_bucket if s3_bucket else self._AWS_BUCKET
68
66
  self.s3file = self.get_s3path(record["bidspath"])
69
67
  self.filecache = self.cache_dir / record["bidspath"]
70
68
  self.bids_dependencies = record["bidsdependencies"]
@@ -176,7 +174,7 @@ class EEGDashBaseRaw(BaseRaw):
176
174
 
177
175
  """
178
176
 
179
- AWS_BUCKET = "s3://openneuro.org"
177
+ _AWS_BUCKET = "s3://openneuro.org"
180
178
 
181
179
  def __init__(
182
180
  self,
@@ -218,7 +216,7 @@ class EEGDashBaseRaw(BaseRaw):
218
216
  )
219
217
 
220
218
  def get_s3path(self, filepath):
221
- return f"{self.AWS_BUCKET}/{filepath}"
219
+ return f"{self._AWS_BUCKET}/{filepath}"
222
220
 
223
221
  def _download_s3(self):
224
222
  self.filecache.parent.mkdir(parents=True, exist_ok=True)
@@ -14,7 +14,50 @@ from .extractors import (
14
14
  TrainableFeature,
15
15
  UnivariateFeature,
16
16
  )
17
- from .feature_bank import * # noqa: F401
17
+ from .feature_bank import ( # Complexity; Connectivity; CSP; Dimensionality; Signal; Spectral
18
+ CoherenceFeatureExtractor,
19
+ CommonSpatialPattern,
20
+ DBSpectralFeatureExtractor,
21
+ EntropyFeatureExtractor,
22
+ HilbertFeatureExtractor,
23
+ NormalizedSpectralFeatureExtractor,
24
+ SpectralFeatureExtractor,
25
+ complexity_approx_entropy,
26
+ complexity_lempel_ziv,
27
+ complexity_sample_entropy,
28
+ complexity_svd_entropy,
29
+ connectivity_imaginary_coherence,
30
+ connectivity_lagged_coherence,
31
+ connectivity_magnitude_square_coherence,
32
+ dimensionality_detrended_fluctuation_analysis,
33
+ dimensionality_higuchi_fractal_dim,
34
+ dimensionality_hurst_exp,
35
+ dimensionality_katz_fractal_dim,
36
+ dimensionality_petrosian_fractal_dim,
37
+ signal_decorrelation_time,
38
+ signal_hjorth_activity,
39
+ signal_hjorth_complexity,
40
+ signal_hjorth_mobility,
41
+ signal_kurtosis,
42
+ signal_line_length,
43
+ signal_mean,
44
+ signal_peak_to_peak,
45
+ signal_quantile,
46
+ signal_root_mean_square,
47
+ signal_skewness,
48
+ signal_std,
49
+ signal_variance,
50
+ signal_zero_crossings,
51
+ spectral_bands_power,
52
+ spectral_edge,
53
+ spectral_entropy,
54
+ spectral_hjorth_activity,
55
+ spectral_hjorth_complexity,
56
+ spectral_hjorth_mobility,
57
+ spectral_moment,
58
+ spectral_root_total_power,
59
+ spectral_slope,
60
+ )
18
61
  from .inspect import (
19
62
  get_all_feature_extractors,
20
63
  get_all_feature_kinds,
@@ -23,10 +66,7 @@ from .inspect import (
23
66
  get_feature_predecessors,
24
67
  )
25
68
  from .serialization import load_features_concat_dataset
26
- from .utils import (
27
- extract_features,
28
- fit_feature_extractors,
29
- )
69
+ from .utils import extract_features, fit_feature_extractors
30
70
 
31
71
  __all__ = [
32
72
  "FeaturesConcatDataset",
@@ -50,4 +90,59 @@ __all__ = [
50
90
  "load_features_concat_dataset",
51
91
  "extract_features",
52
92
  "fit_feature_extractors",
93
+ # Feature part
94
+ # Complexity
95
+ "EntropyFeatureExtractor",
96
+ "complexity_approx_entropy",
97
+ "complexity_sample_entropy",
98
+ "complexity_svd_entropy",
99
+ "complexity_lempel_ziv",
100
+ # Connectivity
101
+ "CoherenceFeatureExtractor",
102
+ "connectivity_magnitude_square_coherence",
103
+ "connectivity_imaginary_coherence",
104
+ "connectivity_lagged_coherence",
105
+ # CSP
106
+ "CommonSpatialPattern",
107
+ # Dimensionality
108
+ "dimensionality_higuchi_fractal_dim",
109
+ "dimensionality_petrosian_fractal_dim",
110
+ "dimensionality_katz_fractal_dim",
111
+ "dimensionality_hurst_exp",
112
+ "dimensionality_detrended_fluctuation_analysis",
113
+ # Signal
114
+ "HilbertFeatureExtractor",
115
+ "signal_mean",
116
+ "signal_variance",
117
+ "signal_skewness",
118
+ "signal_kurtosis",
119
+ "signal_std",
120
+ "signal_root_mean_square",
121
+ "signal_peak_to_peak",
122
+ "signal_quantile",
123
+ "signal_zero_crossings",
124
+ "signal_line_length",
125
+ "signal_hjorth_activity",
126
+ "signal_hjorth_mobility",
127
+ "signal_hjorth_complexity",
128
+ "signal_decorrelation_time",
129
+ # Spectral
130
+ "SpectralFeatureExtractor",
131
+ "NormalizedSpectralFeatureExtractor",
132
+ "DBSpectralFeatureExtractor",
133
+ "spectral_root_total_power",
134
+ "spectral_moment",
135
+ "spectral_entropy",
136
+ "spectral_edge",
137
+ "spectral_slope",
138
+ "spectral_bands_power",
139
+ "spectral_hjorth_activity",
140
+ "spectral_hjorth_mobility",
141
+ "spectral_hjorth_complexity",
53
142
  ]
143
+
144
+
145
+ # This import is not working because of the indice
146
+ # way of the numba, needs to be improve later.
147
+ # TO DO
148
+ #
@@ -1,6 +1,110 @@
1
- from .complexity import *
2
- from .connectivity import *
3
- from .csp import *
4
- from .dimensionality import *
5
- from .signal import *
6
- from .spectral import *
1
+ """Feature bank public API exports.
2
+
3
+ This module consolidates and re-exports the feature extractors and feature
4
+ functions so users can import them directly from
5
+ ``eegdash.features.feature_bank``.
6
+ """
7
+
8
+ from .complexity import (
9
+ EntropyFeatureExtractor,
10
+ complexity_approx_entropy,
11
+ complexity_lempel_ziv,
12
+ complexity_sample_entropy,
13
+ complexity_svd_entropy,
14
+ )
15
+ from .connectivity import (
16
+ CoherenceFeatureExtractor,
17
+ connectivity_imaginary_coherence,
18
+ connectivity_lagged_coherence,
19
+ connectivity_magnitude_square_coherence,
20
+ )
21
+ from .csp import CommonSpatialPattern
22
+ from .dimensionality import (
23
+ dimensionality_detrended_fluctuation_analysis,
24
+ dimensionality_higuchi_fractal_dim,
25
+ dimensionality_hurst_exp,
26
+ dimensionality_katz_fractal_dim,
27
+ dimensionality_petrosian_fractal_dim,
28
+ )
29
+ from .signal import (
30
+ HilbertFeatureExtractor,
31
+ signal_decorrelation_time,
32
+ signal_hjorth_activity,
33
+ signal_hjorth_complexity,
34
+ signal_hjorth_mobility,
35
+ signal_kurtosis,
36
+ signal_line_length,
37
+ signal_mean,
38
+ signal_peak_to_peak,
39
+ signal_quantile,
40
+ signal_root_mean_square,
41
+ signal_skewness,
42
+ signal_std,
43
+ signal_variance,
44
+ signal_zero_crossings,
45
+ )
46
+ from .spectral import (
47
+ DBSpectralFeatureExtractor,
48
+ NormalizedSpectralFeatureExtractor,
49
+ SpectralFeatureExtractor,
50
+ spectral_bands_power,
51
+ spectral_edge,
52
+ spectral_entropy,
53
+ spectral_hjorth_activity,
54
+ spectral_hjorth_complexity,
55
+ spectral_hjorth_mobility,
56
+ spectral_moment,
57
+ spectral_root_total_power,
58
+ spectral_slope,
59
+ )
60
+
61
+ __all__ = [
62
+ # Complexity
63
+ "EntropyFeatureExtractor",
64
+ "complexity_approx_entropy",
65
+ "complexity_sample_entropy",
66
+ "complexity_svd_entropy",
67
+ "complexity_lempel_ziv",
68
+ # Connectivity
69
+ "CoherenceFeatureExtractor",
70
+ "connectivity_magnitude_square_coherence",
71
+ "connectivity_imaginary_coherence",
72
+ "connectivity_lagged_coherence",
73
+ # CSP
74
+ "CommonSpatialPattern",
75
+ # Dimensionality
76
+ "dimensionality_higuchi_fractal_dim",
77
+ "dimensionality_petrosian_fractal_dim",
78
+ "dimensionality_katz_fractal_dim",
79
+ "dimensionality_hurst_exp",
80
+ "dimensionality_detrended_fluctuation_analysis",
81
+ # Signal
82
+ "HilbertFeatureExtractor",
83
+ "signal_mean",
84
+ "signal_variance",
85
+ "signal_skewness",
86
+ "signal_kurtosis",
87
+ "signal_std",
88
+ "signal_root_mean_square",
89
+ "signal_peak_to_peak",
90
+ "signal_quantile",
91
+ "signal_zero_crossings",
92
+ "signal_line_length",
93
+ "signal_hjorth_activity",
94
+ "signal_hjorth_mobility",
95
+ "signal_hjorth_complexity",
96
+ "signal_decorrelation_time",
97
+ # Spectral
98
+ "SpectralFeatureExtractor",
99
+ "NormalizedSpectralFeatureExtractor",
100
+ "DBSpectralFeatureExtractor",
101
+ "spectral_root_total_power",
102
+ "spectral_moment",
103
+ "spectral_entropy",
104
+ "spectral_edge",
105
+ "spectral_slope",
106
+ "spectral_bands_power",
107
+ "spectral_hjorth_activity",
108
+ "spectral_hjorth_mobility",
109
+ "spectral_hjorth_complexity",
110
+ ]
@@ -11,10 +11,7 @@ from mne.io import read_info
11
11
 
12
12
  from braindecode.datautil.serialization import _load_kwargs_json
13
13
 
14
- from .datasets import (
15
- FeaturesConcatDataset,
16
- FeaturesDataset,
17
- )
14
+ from .datasets import FeaturesConcatDataset, FeaturesDataset
18
15
 
19
16
 
20
17
  def load_features_concat_dataset(path, ids_to_load=None, n_jobs=1):
eegdash/preprocessing.py CHANGED
@@ -3,9 +3,7 @@ import logging
3
3
  import mne
4
4
  import numpy as np
5
5
 
6
- from braindecode.preprocessing import (
7
- Preprocessor,
8
- )
6
+ from braindecode.preprocessing import Preprocessor
9
7
 
10
8
  logger = logging.getLogger("eegdash")
11
9
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eegdash
3
- Version: 0.2.1.dev178237806
3
+ Version: 0.3.0
4
4
  Summary: EEG data for machine learning
5
5
  Author-email: Young Truong <dt.young112@gmail.com>, Arnaud Delorme <adelorme@gmail.com>, Bruno Aristimunha <b.aristimunha@gmail.com>
6
6
  License: GNU General Public License
@@ -68,19 +68,30 @@ Provides-Extra: dev
68
68
  Requires-Dist: pre-commit; extra == "dev"
69
69
  Provides-Extra: docs
70
70
  Requires-Dist: sphinx; extra == "docs"
71
+ Requires-Dist: sphinx_design; extra == "docs"
71
72
  Requires-Dist: sphinx_gallery; extra == "docs"
72
73
  Requires-Dist: sphinx_rtd_theme; extra == "docs"
74
+ Requires-Dist: pydata-sphinx-theme; extra == "docs"
73
75
  Requires-Dist: numpydoc; extra == "docs"
76
+ Requires-Dist: memory_profiler; extra == "docs"
77
+ Requires-Dist: ipython; extra == "docs"
78
+ Requires-Dist: lightgbm; extra == "docs"
74
79
  Provides-Extra: all
80
+ Requires-Dist: pre-commit; extra == "all"
75
81
  Requires-Dist: pytest; extra == "all"
76
82
  Requires-Dist: pytest-cov; extra == "all"
77
83
  Requires-Dist: codecov; extra == "all"
78
84
  Requires-Dist: pytest_cases; extra == "all"
79
- Requires-Dist: pre-commit; extra == "all"
85
+ Requires-Dist: pytest-benchmark; extra == "all"
80
86
  Requires-Dist: sphinx; extra == "all"
87
+ Requires-Dist: sphinx_design; extra == "all"
81
88
  Requires-Dist: sphinx_gallery; extra == "all"
82
89
  Requires-Dist: sphinx_rtd_theme; extra == "all"
90
+ Requires-Dist: pydata-sphinx-theme; extra == "all"
83
91
  Requires-Dist: numpydoc; extra == "all"
92
+ Requires-Dist: memory_profiler; extra == "all"
93
+ Requires-Dist: ipython; extra == "all"
94
+ Requires-Dist: lightgbm; extra == "all"
84
95
  Dynamic: license-file
85
96
 
86
97
  # EEG-Dash
@@ -1,19 +1,19 @@
1
- eegdash/__init__.py,sha256=5WP-O-5EjRXkQ2BZAn_KKMPeMyWezCmWf5sYLb-dihE,245
2
- eegdash/api.py,sha256=IQ0c26g7TnqzXv6lqlvMB9EHlobiTrK0YpiDa7ShcrE,26786
1
+ eegdash/__init__.py,sha256=MntTC7axANEZtRLMIzcWZGS6-WiuYqdtR5Ef6fTY28c,232
2
+ eegdash/api.py,sha256=igpkLTCjH6NNQf8tEizA6SF8cYa1gE22-hNVxNRPszg,26747
3
3
  eegdash/data_config.py,sha256=OS6ERO-jHrnEOfMJUehY7ieABdsRw_qWzOKJ4pzSfqw,1323
4
- eegdash/data_utils.py,sha256=mR0TtERYIefakGQ98jwAeeRVKSNDU9eBlUoH1AY9tnc,23663
4
+ eegdash/data_utils.py,sha256=Y8Kh52zcDKY5sXblMrYhbRrL4BkQ-QUghjs0RPeW0oo,23658
5
5
  eegdash/dataset.py,sha256=NK5CVGtHvGNlhdbZPaRUWtyLBDxUlyiSz-ot3BrxHQE,2443
6
6
  eegdash/mongodb.py,sha256=GD3WgA253oFgpzOHrYaj4P1mRjNtDMT5Oj4kVvHswjI,2006
7
- eegdash/preprocessing.py,sha256=wvqAO8UgDoQQz7xjVykrl4V8AawS4tpKR4Vrr_9BovY,2230
7
+ eegdash/preprocessing.py,sha256=7S_TTRKPKEk47tTnh2D6WExBt4cctAMxUxGDjJqq5lU,2221
8
8
  eegdash/utils.py,sha256=wU9CBQZLW_LIQIBwhgQm5bU4X-rSsVNPdeF2iE4QGJ4,410
9
- eegdash/features/__init__.py,sha256=484CLxpPifc8ZQfeM8jWZLvtVKljCxn3qqlUCaq-Yxk,1284
9
+ eegdash/features/__init__.py,sha256=BXNhjvL4_SSFAY1lcP9nyGpkbJNtoOMH4AHlF6OyABo,4078
10
10
  eegdash/features/datasets.py,sha256=kU1DO70ArSIy-LF1hHD2NN4iT-kJrI0mVpSkyV_OSeI,18301
11
11
  eegdash/features/decorators.py,sha256=v0qaJz_dcX703p1fvFYbAIXmwK3d8naYGlq7fRVKn_w,1313
12
12
  eegdash/features/extractors.py,sha256=H7h6tP3dKoRcjDJpWWAo0ppmokCq5QlhqMcehYwYV9s,6845
13
13
  eegdash/features/inspect.py,sha256=PmbWhx5H_WqpnorUpWONUSkUtaIHkZblRa_Xyk7Szyc,1569
14
- eegdash/features/serialization.py,sha256=pNsTz0EeRPPYE-A61XK7UoMShI9YBEHQqC5STbzUU6A,2861
14
+ eegdash/features/serialization.py,sha256=snXuHVd0CoT2ese0iWi5RwZrVHCGc0oCZ8-SXqGY88I,2848
15
15
  eegdash/features/utils.py,sha256=eM6DdyOpdVfNh7dSPykJ0WaTDtaGvkCQWAmW0G8v60Y,3784
16
- eegdash/features/feature_bank/__init__.py,sha256=BKrM3aaggXrfey1yEjEBYaxOV5e3UK-o8oGeB30epOg,149
16
+ eegdash/features/feature_bank/__init__.py,sha256=YsMXLC1FEtHL3IEw9pYw1fc5IY0x_hr2qWQowI5gZj8,2991
17
17
  eegdash/features/feature_bank/complexity.py,sha256=Ds1GAXZ0LGM32xB4EZC2jbMljUBv0yicf2SkuyLvN5I,3183
18
18
  eegdash/features/feature_bank/connectivity.py,sha256=bQ6KlxWm5GNpCS9ypLqBUr2L171Yq7wpBQT2tRQKTZ4,2159
19
19
  eegdash/features/feature_bank/csp.py,sha256=YOzieLnOcqjvfrcjvg8R3S4SWuC1BqK5J5WXVNCCTc0,3304
@@ -21,8 +21,8 @@ eegdash/features/feature_bank/dimensionality.py,sha256=j_Ds71Y1AbV2uLFQj8EuXQ4kz
21
21
  eegdash/features/feature_bank/signal.py,sha256=3Tb8z9gX7iZipxQJ9DSyy30JfdmW58kgvimSyZX74p8,3404
22
22
  eegdash/features/feature_bank/spectral.py,sha256=bNB7skusePs1gX7NOU6yRlw_Gr4UOCkO_ylkCgybzug,3319
23
23
  eegdash/features/feature_bank/utils.py,sha256=DGh-Q7-XFIittP7iBBxvsJaZrlVvuY5mw-G7q6C-PCI,1237
24
- eegdash-0.2.1.dev178237806.dist-info/licenses/LICENSE,sha256=KykUD4H3kw3HLz5bZ0kxMWwZotnk8rhkfCCerGyX2sk,855
25
- eegdash-0.2.1.dev178237806.dist-info/METADATA,sha256=dn351VNZC1rthL5pYZejIE9ouYek-mp6ZbatrBlKm1k,10137
26
- eegdash-0.2.1.dev178237806.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
- eegdash-0.2.1.dev178237806.dist-info/top_level.txt,sha256=zavO69HQ6MyZM0aQMR2zUS6TAFc7bnN5GEpDpOpFZzU,8
28
- eegdash-0.2.1.dev178237806.dist-info/RECORD,,
24
+ eegdash-0.3.0.dist-info/licenses/LICENSE,sha256=KykUD4H3kw3HLz5bZ0kxMWwZotnk8rhkfCCerGyX2sk,855
25
+ eegdash-0.3.0.dist-info/METADATA,sha256=N4w48rU1-1ESNg9ESdMG7HplEuOeIXvJX-h_anvWDN0,10621
26
+ eegdash-0.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
+ eegdash-0.3.0.dist-info/top_level.txt,sha256=zavO69HQ6MyZM0aQMR2zUS6TAFc7bnN5GEpDpOpFZzU,8
28
+ eegdash-0.3.0.dist-info/RECORD,,