You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PCA singular value non-deterministic test failure on Appveyor #7893
======================================================================
FAIL: sklearn.decomposition.tests.test_pca.test_singular_values
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Python35\lib\site-packages\nose\case.py", line 198, in runTest
self.test(*self.arg)
File "C:\Python35\lib\site-packages\sklearn\decomposition\tests\test_pca.py", line 266, in test_singular_values
np.linalg.norm(X_apca, "fro")**2.0, 12)
File "C:\Python35\lib\site-packages\numpy\testing\utils.py", line 842, in assert_array_almost_equal
precision=decimal)
File "C:\Python35\lib\site-packages\numpy\testing\utils.py", line 665, in assert_array_compare
raise AssertionError(msg)
AssertionError:
Arrays are not almost equal to 12 decimals
(mismatch 100.0%)
x: array(613.0583877392909)
y: array(613.0583877392893)
sklearn.ensemble.tests.test_bagging.test_base_estimator: 5.2514s
which is weird since it's arpack and we set a random state? I'm not entirely sure what the status of our initialization for arpack svds is though, I know there were some recent changes...
@jnothman
Thanks. I also feel strange. I read the source code and don't find any mistake currently. Since the error only happen for python3.5 in 32-bit Windows, maybe it's a bug for python3.5(new python) in 32-bit Windows(old Windows). With your support, I'll make a pull request today to close the issue.
Activity
lesteve commentedon Nov 17, 2016
I may be missing something but I think the build you are linking to is not a build from master but from the PR #7872 ...
This is the latest build from master I can find on AppVeyor and it is all green:
https://ci.appveyor.com/project/sklearn-ci/scikit-learn/build/1.0.10236
amueller commentedon Nov 17, 2016
The build is from a PR that didn't change anything in PCA though. I guess it's a non-deterministic failure?
amueller commentedon Nov 17, 2016
which is weird since it's arpack and we set a random state? I'm not entirely sure what the status of our initialization for arpack svds is though, I know there were some recent changes...
dalmia commentedon Nov 29, 2016
@amueller I want to work on the issue. Could you please guide me as to how can I get started with working on this?
lesteve commentedon Nov 29, 2016
I just noticed it happened more recently on master:
https://ci.appveyor.com/project/sklearn-ci/scikit-learn/build/1.0.10302/job/p5gdb45li72pe6bi
@dalmia this happens on Windows only and not deterministically. Maybe not the best issue if you do not have a Windows machine.
dalmia commentedon Nov 29, 2016
@amueller Yes, I don't. Thanks for letting me know.
[-]PCA singluar value test failure on master[/-][+]PCA singular value non-deterministic test failure on Appveyor[/+]qinhanmin2014 commentedon Jun 19, 2017
It happened again in https://ci.appveyor.com/project/sklearn-ci/scikit-learn/build/1.0.14629/job/t8udw2qky46u5ewm (#9108). CI become green after an empty commit. The wrong result in three cases are exactly the same(wrong result:613.0583877392909, right result:613.0583877392893). In order to prevent such confusion, do you agree to change the
decimalrestriction inassert_array_almost_equalfrom 12 to 6(default value) ? It seems reasonable to me. @amueller @lestevejnothman commentedon Jun 19, 2017
qinhanmin2014 commentedon Jun 19, 2017
@jnothman
Thanks. I also feel strange. I read the source code and don't find any mistake currently. Since the error only happen for python3.5 in 32-bit Windows, maybe it's a bug for python3.5(new python) in 32-bit Windows(old Windows). With your support, I'll make a pull request today to close the issue.