Repository navigation
Commit 5f507e6
authored
[FIX] riemann ASR eigpair mismatch in nonlinear_eigenspace (#100)
## Summary
- fix issue #99 by returning eigenvalues consistent with optimized
eigenvectors in nonlinear_eigenspace
- compute eigenvalues from Rayleigh quotients of the optimized basis
(diag(X.T @ L @ X))
- add regression test to ensure returned eigenvalues match returned
eigenvectors
## Why
The previous implementation returned eigenvalues from a
random-initialization matrix (S0) but eigenvectors from the optimizer
solution (Xsol.point), producing mismatched eigpairs and unstable
component ordering in riemann ASR.
## Validation
- reproduced issue behavior before fix (riemann selecting clean
channels)
- after fix, reproduced expected behavior (no inverted channel
selection)
- tests run:
- tests/test_cov.py::test_nonlinear_eigenspace_consistent_eigpairs
- tests/test_asr.py with riemann-focused selection
Closes #991 parent 72054a4 commit 5f507e6
2 files changed
Lines changed: 39 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
513 | | - | |
514 | | - | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
102 | 129 | | |
103 | 130 | | |
104 | 131 | | |
| |||
0 commit comments