Skip to content

Use compatible tolerance for tests - #573

Merged
privefl merged 1 commit into
privefl:masterfrom
yixuan:master
Jul 10, 2026
Merged

Use compatible tolerance for tests#573
privefl merged 1 commit into
privefl:masterfrom
yixuan:master

Conversation

@yixuan

@yixuan yixuan commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Hi @privefl, recently I was preparing for the new version of RSpectra, and I encountered some numerical issues in the reverse dependency tests. One of them is related to the comparison between pcadapt::pcadapt() and bigstatsr::big_randomSVD(). The issue is that both of these two functions use a default tolerance of 1e-4, but expect_equal() has a default value roughly at the order of 1e-8.

I think it makes more sense to explicitly declare the precision in computing the SVD, and then use a compatible tolerance for expect_equal(). Let me know if you have any questions. Thank you!

@privefl

privefl commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Which version of {RSpectra} should I use to test this?

@yixuan

yixuan commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

The develop branch will be the upcoming RSpectra 0.17-0.

@privefl
privefl merged commit 4bc7f81 into privefl:master Jul 10, 2026
5 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