NeuroTechX / NeuroTechX/moabb

Remove dataset-dependent args in CCA pipelines

Open
#376 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

easy enhancement help wanted moabb
Dominant language
Python
Stars
1.1k
Forks
264
Avg merge
1d 13m
Merged PRs (30d)
23

Description

Existing CCA-based pipelines (CCA, TRCA, MsetCCA, see https://github.com/NeuroTechX/moabb/blob/79cbb71c1ed116d7e5bc9368311aff6f3e2b5f19/moabb/pipelines/classification.py#L14) need information about sampling frequency, stimulation frequencies, and/or epoch interval. This shouldn't be the case as it makes the pipelines dataset-dependant.

A possible solution is to change the code from those sklearn estimators to take MNE epochs rather than ndarray. It should be then possible to access directly to the sfreq and interval from the MNE object. The stimulation frequencies could be directly infered from the labels.

This issue requires to rewrite part of the code those CCA pipeline but does not requires any specific knowledge on the CCA or the methods themselves.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in moabb/pipelines/classification.py at the CCA, TRCA, and MsetCCA pipeline definitions referenced by the issue. Trace how their sklearn estimators currently receive sampling frequency, stimulation frequencies, and epoch intervals, then review the surrounding pipeline usage. Done means these pipelines no longer require dataset-dependent arguments and derive the available information from MNE epochs and labels.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, scikit-learn
Domain
machine-learning
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.