docs: add Geometry-Aware recentering example (cross-session double dissociation)#1113
Open
rahimipour-meysam-NeurIPS wants to merge 2 commits into
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
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.
What this adds
A single reproducible example,
examples/advanced_examples/plot_geometry_aware_recentering.py, demonstrating unsupervised test-time tangent-space recentering (TangentSpace(tsupdate=True)) for cross-session EEG motor-imagery decoding.The example reproduces a within/cross double dissociation: recentering gives a clear advantage under
CrossSessionEvaluation(there is a between-session covariance shift to correct), while the same two pipelines (recenter on vs. off) are close to indistinguishable underWithinSessionEvaluation(no such shift exists there). This isolates recentering — rather than the choice of final classifier — as the mechanism behind the cross-session gain.This follows the same pattern as
plot_euclidean_alignment.py(#1109): no new class or module is introduced (the mechanism already exists inpyriemannviaTangentSpace(tsupdate=True)and, more generally,pyriemann.transfer.TLCenter), just a documented, runnable demonstration using MOABB's own evaluation classes.Background
The result reproduced here is from a manuscript currently in preparation:
The full study benchmarks this recentering pipeline against classical Riemannian baselines and deep sequence models (a bidirectional Mamba mixture-of-experts, an SPDNet-style network) across eight public MOABB datasets, with full statistical validation (Friedman omnibus, FDR/Holm-corrected Wilcoxon, Cohen's d, bootstrap CIs, Critical-Difference analysis). This PR only reproduces the core within/cross mechanism on a single dataset, as a self-contained gallery example — not the full benchmark.
I reached out to Sylvain Chevallier by email about this direction and he mentioned PRs to MOABB are welcome, which is what prompted this contribution.
Checklist
BNCI2014_001, bothCrossSessionEvaluationandWithinSessionEvaluation)docs/source/whats_new.rstupdated under "Enhancements"pyriemannandmoabbevaluation classes only)