Repository navigation
Fix eigenvector indexing and default cutoff in diffusionmap - #5521
RitikaSen27 wants to merge 3 commits into
Conversation
DiffusionMap.run() sorted eigenvectors by row and transform() selected rows, but np.linalg.eig returns eigenvector k as column k. DistanceMatrix default cutoff was 1e0 - 5 (-4.0) instead of 1e-5. Update expected eigenvectors in existing tests and add regression tests. Fixes MDAnalysis#5518
Documentation build overview
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #5521 +/- ##
========================================
Coverage 93.92% 93.92%
========================================
Files 184 184
Lines 22661 22661
Branches 3223 3223
========================================
+ Hits 21284 21285 +1
Misses 917 917
+ Partials 460 459 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Two CI jobs failed with a crashed pytest worker, and both logs show
All other tests in those jobs passed (23894 and 20733), including the |
orbeckst
left a comment
There was a problem hiding this comment.
Please restore the standard PR template, including all the check boxes. We won't review PRs that miss this information. Thanks.
Fixes #5518
Changes made in this Pull Request:
DiffusionMap.run()sorted the eigenvectors by row, butnp.linalg.eigreturns eigenvector k as column k. It now sorts by column.
DiffusionMap.transform()now selects columns instead of rows.DistanceMatrixdefaultcutoffwas1e0 - 5(-4.0); it is now1e-5.Also fixed the
1EO-5typo in its docstring.test_dist_weightsandtest_dist_weights_frames(they are now the transpose of the old values;all four eigenvalues are 1, so their order is arbitrary).
coordinate for points on a line, default cutoff). They fail on 2.11.0
and pass with this change.
correct if needed.
Note: this changes the output of
DiffusionMap.transform(). Whether thatneeds a deprecation note or just the CHANGELOG entry is for the maintainers
to decide.
LLM / AI generated code disclosure
LLMs or other AI-powered tools (beyond simple IDE use cases) were used in this contribution: no