-
Notifications
You must be signed in to change notification settings - Fork 1.4k
WIP: Add GED transformer #13259
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
base: main
Are you sure you want to change the base?
WIP: Add GED transformer #13259
Conversation
Already have a failure but fortunately it's just a tol issue I think:
I would just bump the |
Thanks! It might be that the small difference between filters_ will propagate and increase in patterns_, so rtol/atol won't be much of help for patterns_. But let's see |
Different architectures, macos-13 is Intel x86_64 and macos-latest is ARM / M1. And Windows also failed, could be use of MKL there or something. I'm cautiously optimistic it's just floating point errors... |
What does this implement/fix?
Adds transformer for generalized eigenvalue decomposition (or approximate joint diagonalization) of covariance matrices.
It generalizes xdawn, csp, ssd, and spoc algorithms.
Additional information
Currently testing that it outputs identical filters and patterns as child classes for all tests.
Next step will be to clean up redundant code from the child classes, and unify linear algebra, e.g.:
(1) choose between mne's pinv or np.linalg.pinv for all classes
(2) remove hacky _mult_order from _smart_ged (it's currently there as, numerically, change of multiplication order breaks np.testing.assert_allclose for ssd)
(3) perhaps ssd should use mne.cov.compute_whitener() instead of its own whitener implementation. It won't be identical, but conceptually seems to do the same thing.
(4) add feature to perform GED in the principal subspace for xdawn