-
Notifications
You must be signed in to change notification settings - Fork 226
Correct CCA, TRCA and MsetCCA pipelines #625
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
qbarthelemy
reviewed
Jun 17, 2024
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>
Signed-off-by: Bru <b.aristimunha@gmail.com>
Signed-off-by: Bru <b.aristimunha@gmail.com>
9f9f2a9 to
2c07933
Compare
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.
Collaborator
|
Many thanks @sylvchev and @qbarthelemy 🙏🏽 |
sylvchev
commented
Jan 27, 2026
Member
Author
sylvchev
left a comment
There was a problem hiding this 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use Epochs instead of numpy for CCA, TRCA and MsetCCA, fix label estimation.