You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mir() misses auto-detected rank reduction in _pca_reduced #283
Found while writing PR #282's annotation x rank-reduction tests: AMICATorchNG._pca_reduced() (torch_impl/core.py ~:2430) decides PCA-reduction incompatibility by checking 'self.pcakeep is not None or self.pcadb is not None' — the explicit parameters only. A fit whose rank reduction came from AUTOMATIC numerical-rank detection (mineig/mineig_rel, no explicit pcakeep/pcadb) slips past the guard, and AMICAICA.mir() then dies with an opaque numpy.linalg.LinAlgError ('Last 2 dimensions of the array must be square') instead of the documented ValueError ('mir() is incompatible with PCA reduction'). The minimal repro is in PR #282's body (rank-16-projected real EEG through the MNE wrapper with mineig_rel-based detection).
Fix direction: derive reducedness from the fitted geometry (non-square sphere / n_components_ < n_channels) rather than from which parameter caused it, per backend-parity check the numpy backend's equivalent guard for the same hole, and add the regression test PR #282 deliberately left out.
Found by the #261 test work; the failing path affects exactly the Maxwell-filtered MEG configuration the external tester runs. Related: #261, #223, #221.
Activity