Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct CCA, TRCA and MsetCCA pipelines #625

Open
wants to merge 18 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions contexts/ssvep_kalunga_norest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SSVEP:
events:
- "13"
- "17"
- "21"
n_classes: 3
2 changes: 2 additions & 0 deletions contexts/ssvep_resample.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SSVEP:
resample: 250.0
2 changes: 1 addition & 1 deletion docs/source/whats_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Enhancements

Bugs
~~~~
- None
- Correct :class:`moabb.pipelines.classification.SSVEP_CCA` and :class:`moabb.pipelines.classification.SSVEP_TRCA` behavior (:gh:`XXX`by `Sylvain Chevallier`_)

API changes
~~~~~~~~~~~
Expand Down
11 changes: 10 additions & 1 deletion moabb/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@
log = logging.getLogger(__name__)


def _ppl_needs_epochs(pn):
"""Check if the pipeline needs MNE epochs as input."""
ppl_with_epochs = ["braindecode", "Keras", "SSVEP CCA", "TRCA-SSVEP", "MsetCCA-SSVEP"]
if any(s in pn for s in ppl_with_epochs):
return True
else:
return False


def benchmark( # noqa: C901
pipelines="./pipelines/",
evaluations=None,
Expand Down Expand Up @@ -165,7 +174,7 @@ def benchmark( # noqa: C901

ppl_with_epochs, ppl_with_array = {}, {}
for pn, pv in prdgms[paradigm].items():
if "braindecode" in pn or "Keras" in pn:
if _ppl_needs_epochs(pn):
ppl_with_epochs[pn] = pv
else:
ppl_with_array[pn] = pv
Expand Down
Loading
Loading