Skip to content

Conversation

@sylvchev
Copy link
Member

Use Epochs instead of numpy for CCA, TRCA and MsetCCA, fix label estimation.

bruAristimunha and others added 8 commits January 17, 2026 21:08
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>
Signed-off-by: Bru <b.aristimunha@gmail.com>
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>
Signed-off-by: Bru <b.aristimunha@gmail.com>
SSVEP_CCA, SSVEP_TRCA, and SSVEP_MsetCCA do not accept interval and freqs
parameters in their constructors. These classes extract frequency and interval
information directly from MNE Epochs objects during fitting.

Fixes TypeError when running plot_cross_subject_ssvep.py and
plot_within_session_ssvep.py examples.
SSVEP classifiers (SSVEP_CCA, SSVEP_TRCA, SSVEP_MsetCCA) require MNE Epochs
objects during fitting, not numpy arrays. This change ensures that when using
SSVEP paradigms, the evaluation framework passes MNE Epochs objects to the
pipeline's fit method.

The fix works by:
1. Detecting when the paradigm is a BaseSSVEP instance
2. Forcing return_epochs=True for SSVEP paradigms
3. Not passing the process_pipeline to ensure it's created with return_epochs=True
4. This ensures the data returned is MNE Epochs instead of numpy arrays

Fixes failing examples:
- examples/paradigm_examples/plot_within_session_ssvep.py
- examples/paradigm_examples/plot_cross_subject_ssvep.py
…luation

- Fix LogisticRegression(multi_class='auto') deprecated parameter in plot_cross_subject_ssvep.py
- Replace with max_iter=1000 and remove deprecated multi_class parameter
- Fix codecarbon_task_name missing in evaluation results
- Improve detection of pipelines requiring MNE Epochs (check pipeline steps)
- Set n_fbands=3 for SSVEP_TRCA to match the 3 stimulus frequencies in example
- Ensures evaluation framework correctly handles both numpy arrays and MNE Epochs
Signed-off-by: Bru <b.aristimunha@gmail.com>
bruAristimunha and others added 9 commits January 18, 2026 15:59
Signed-off-by: Bru <a.bruno@aluno.ufabc.edu.br>
…zation failure

The RomaniBF2025ERP dataset was attempting to download during __init__, causing
FileNotFoundError when the dataset was instantiated during paradigm.datasets checks.
This change defers the download until data is actually accessed, allowing the
dataset to be instantiated without network operations.
Add suffix parameter to benchmark() function to allow differentiation
of results files when multiple benchmarks use the same paradigm and
evaluation. Updated plot_benchmark.py and plot_benchmark_grid_search.py
to use unique suffixes, preventing HDF5 file locking errors when
running in parallel.
@bruAristimunha bruAristimunha enabled auto-merge (squash) January 18, 2026 23:31
@bruAristimunha bruAristimunha merged commit 1f4728a into NeuroTechX:develop Jan 18, 2026
14 of 15 checks passed
@bruAristimunha
Copy link
Collaborator

Many thanks @sylvchev and @qbarthelemy 🙏🏽

Copy link
Member Author

@sylvchev sylvchev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch @bruAristimunha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants