8000 [MRG] TST Increases tol for check_pca_float_dtype_preservation assertion by thomasjpfan · Pull Request #15775 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

[MRG] TST Increases tol for check_pca_float_dtype_preservation assertion #15775

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sklearn/decomposition/tests/test_pca.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ def check_pca_float_dtype_preservation(svd_solver):
assert pca_64.transform(X_64).dtype == np.float64
assert pca_32.transform(X_32).dtype == np.float32

assert_allclose(pca_64.components_, pca_32.components_, rtol=1e-4)
assert_allclose(pca_64.components_, pca_32.components_, rtol=2e-4)
Copy link
Member

Choose a reason for hiding this comment

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

maybe a comment as why this tolerance?

supporting platforms which we don't have in our CI doesn't sound logical to me though.

Copy link
Member Author

Choose a reason for hiding this comment

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

Are we okay with conda-forge skipping this test for one of their platforms?

Copy link
Member

Choose a reason for hiding this comment

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

I think it's better to increase tolerance rather than ask distributors to skip tests..



def check_pca_int_dtype_upcast_to_double(svd_solver):
Expand Down
0