Skip to content

Add tests to ensure SVD error decreases monotonically with rank#564

Merged
nefrathenrici merged 1 commit into
mainfrom
ne/test
Jun 3, 2026
Merged

Add tests to ensure SVD error decreases monotonically with rank#564
nefrathenrici merged 1 commit into
mainfrom
ne/test

Conversation

@nefrathenrici

@nefrathenrici nefrathenrici commented May 21, 2026

Copy link
Copy Markdown
Member

This PR adds a small unit test to ensure that a truncated SVD's error decreases monotonically as rank increases. No existing functionality is changed.

@nefrathenrici nefrathenrici force-pushed the ne/test branch 3 times, most recently from a8becba to f4e1000 Compare May 22, 2026 21:33
@nefrathenrici nefrathenrici marked this pull request as ready for review May 22, 2026 21:36
@nefrathenrici nefrathenrici requested a review from odunbar May 22, 2026 21:58

@odunbar odunbar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine having a test for this (as in future we may move to approximate SVD solvers) but i'm a bit confused why we need it currently.

Right now the method svd(A) should guarantee this property. Did you see some issues with monotonicity here in your work?

@nefrathenrici

Copy link
Copy Markdown
Member Author

I'm fine having a test for this (as in future we may move to approximate SVD solvers) but i'm a bit confused why we need it currently.

Right now the method svd(A) should guarantee this property. Did you see some issues with monotonicity here in your work?

I haven't seen any issues with monotonicity, Tapio wanted to ensure that the truncated SVD error decreases monotonically. If this is already guaranteed by an upstream method we don't need to add redundant tests.

@odunbar

odunbar commented Jun 3, 2026

Copy link
Copy Markdown
Member

It's ok, merge away! Right now it's guaranteed but maybe in future it won't be. I'm ok with redundancy for tests

@nefrathenrici nefrathenrici merged commit 3020da8 into main Jun 3, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants