ENH: add generalized eigendecomposition preprocessing#14050
ENH: add generalized eigendecomposition preprocessing#14050SaharSattari wants to merge 2 commits into
Conversation
|
We already have quite some GED-related code (see, e.g., #13346), have you looked? We would much rather improve/extend existing code than add 900 new, independent lines. I'd recommend a GitHub issue that outlines what we currently have, and what new or additional things could be added |
Thank you for pointing this out. My intended use case is somewhat different. The goal was to use GED similarly to ICA as a preprocessing tool. From my initial understanding, the existing code provides the underlying eigendecomposition and spatial-filter infrastructure, but not a preprocessing workflow. I’ll review the existing implementation more carefully and open an issue outlining what is already supported, what may be missing for this preprocessing use case, and how the existing implementation could potentially be extended rather than introducing a separate implementation. Thank you for the guidance. |
|
Sounds good, thanks for investigating and working on how to contribute this to MNE! |
This pull request adds a new mne.preprocessing.GED class implementing generalized eigendecomposition (GED) for contrast-based EEG preprocessing.
The implementation:
Rawobjects;The implementation is based on the GED artifact-removal approach used in:
I adapted the implementation from my own published research code. I used ChatGPT (GPT-5.6 Thinking) to help adapt the implementation to the MNE-Python API, assist with test development, docstrings, and the contribution workflow. I reviewed all generated code and documentation, tested the implementation locally on synthetic and MNE example data, and verified that the GED-specific tests and documentation checks pass.