← Lab
kdasym
confirmedupstream bugPython · pyDML / scipySystems & data structuresJuly 25, 2026
the question
Does pyDML's kernel discriminant analysis return valid eigenvectors when it feeds the non-symmetric product inv(N)M to scipy's symmetric solver eigh?
what came out
pyDML's KDA forms the non-symmetric product inv(N)M and passes it to scipy.linalg.eigh, the symmetric solver, which reads one triangle and decomposes a different matrix. The real KDA transformer matches the buggy path bit-for-bit, eigen-residual 1.08 vs 4.9e-9 for eig. Fix: eigh(M, N).
method & receipts
- Result: confirmed
- Reproducible — one script re-runs the whole thing from scratch.
- Tested — a correctness/benchmark suite ships alongside the code.
→ read the code and re-run it
github.com/v-code01/kdasym