TST: precision too high in test_normality #1113

Closed
josef-pkt opened this Issue Oct 12, 2013 · 1 comment

Projects

None yet

1 participant

@josef-pkt
Member

test precision too high

this has started to fail recently on Debian testing.
I don't know what changed to trigger this. It didn't fail before and there are no related changes in master, IIRC

http://nipy.bic.berkeley.edu/builders/statsmodels-py2.x-sid-sparc/builds/28/steps/shell_4/logs/stdio

======================================================================
FAIL: statsmodels.stats.tests.test_diagnostic.TestDiagnosticG.test_normality
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/buildslave/nd-bb-slave-sparc-sid/statsmodels-py2_x-sid-sparc/build/venv/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/buildslave/nd-bb-slave-sparc-sid/statsmodels-py2_x-sid-sparc/build/venv/local/lib/python2.7/site-packages/statsmodels-0.6.0-py2.7-linux-sparc64.egg/statsmodels/stats/tests/test_diagnostic.py", line 557, in test_normality
    compare_t_est(lf1, lillifors1, decimal=(15, 14))
  File "/home/buildslave/nd-bb-slave-sparc-sid/statsmodels-py2_x-sid-sparc/build/venv/local/lib/python2.7/site-packages/statsmodels-0.6.0-py2.7-linux-sparc64.egg/statsmodels/stats/tests/test_diagnostic.py", line 32, in compare_t_est
    assert_almost_equal(sp[0], sp_dict['statistic'], decimal=decimal[0])
  File "/home/buildslave/nd-bb-slave-sparc-sid/statsmodels-py2_x-sid-sparc/build/venv/local/lib/python2.7/site-packages/numpy/testing/utils.py", line 468, in assert_almost_equal
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 15 decimals
 ACTUAL: 0.072339090878659695
 DESIRED: 0.0723390908786589

======================================================================
FAIL: statsmodels.stats.tests.test_diagnostic.TestDiagnosticGPandas.test_normality
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/buildslave/nd-bb-slave-sparc-sid/statsmodels-py2_x-sid-sparc/build/venv/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/buildslave/nd-bb-slave-sparc-sid/statsmodels-py2_x-sid-sparc/build/venv/local/lib/python2.7/site-packages/statsmodels-0.6.0-py2.7-linux-sparc64.egg/statsmodels/stats/tests/test_diagnostic.py", line 557, in test_normality
    compare_t_est(lf1, lillifors1, decimal=(15, 14))
  File "/home/buildslave/nd-bb-slave-sparc-sid/statsmodels-py2_x-sid-sparc/build/venv/local/lib/python2.7/site-packages/statsmodels-0.6.0-py2.7-linux-sparc64.egg/statsmodels/stats/tests/test_diagnostic.py", line 32, in compare_t_est
    assert_almost_equal(sp[0], sp_dict['statistic'], decimal=decimal[0])
  File "/home/buildslave/nd-bb-slave-sparc-sid/statsmodels-py2_x-sid-sparc/build/venv/local/lib/python2.7/site-packages/numpy/testing/utils.py", line 468, in assert_almost_equal
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 15 decimals
 ACTUAL: 0.072339090878659917
 DESIRED: 0.0723390908786589
@josef-pkt
Member

another on some Ubuntu one reported on other issues

======================================================================
FAIL: statsmodels.sandbox.tests.test_pca.test_pca_svd
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/skipper/statsmodels/statsmodels-skipper/statsmodels/sandbox/tests/test_pca.py", line 60, in test_pca_svd
    assert_array_almost_equal(msign*evecs_svd, evecs, 14)
  File "/usr/local/lib/python2.7/dist-packages/numpy/testing/utils.py", line 811, in assert_array_almost_equal
    header=('Arrays are not almost equal to %d decimals' % decimal))
  File "/usr/local/lib/python2.7/dist-packages/numpy/testing/utils.py", line 644, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 14 decimals

(mismatch 6.25%)
 x: array([[-0.65989918,  0.22621849, -0.58828335, -0.40899997],
       [-0.15824945,  0.31894199,  0.71689624, -0.59941046],
       [ 0.34887664,  0.9029405 , -0.17151018,  0.1832152 ],
       [-0.64635538,  0.17832458,  0.33251578,  0.66321815]])
 y: array([[-0.65989918,  0.22621849, -0.58828335, -0.40899997],
       [-0.15824945,  0.31894199,  0.71689624, -0.59941046],
       [ 0.34887664,  0.9029405 , -0.17151018,  0.1832152 ],
       [-0.64635538,  0.17832458,  0.33251578,  0.66321815]])
@josef-pkt josef-pkt added a commit to josef-pkt/statsmodels that referenced this issue Oct 27, 2013
@josef-pkt josef-pkt TST: lower precision for normality tests, see #1113 05d9894
@josef-pkt josef-pkt added a commit to josef-pkt/statsmodels that referenced this issue Oct 27, 2013
@josef-pkt josef-pkt TST lower precision in test_pca_svd closes #1113
    (lowering all by one, I cannot check)
6719d14
@josef-pkt josef-pkt added a commit to josef-pkt/statsmodels that referenced this issue Oct 27, 2013
@josef-pkt josef-pkt TST: lower precision for normality tests, see #1113 9b374e7
@josef-pkt josef-pkt added a commit that closed this issue Nov 8, 2013
@josef-pkt josef-pkt TST lower precision in test_pca_svd closes #1113
    (lowering all by one, I cannot check)
c3c20ca
@josef-pkt josef-pkt closed this in c3c20ca Nov 8, 2013
@jseabold jseabold added a commit that referenced this issue Nov 23, 2013
@jseabold jseabold Backport PR #1157: Tst precision master
some adjustments to test precision.

lower to avoid failures on some machines see #1113

(I also have my initial branch written against maintenance)
debc1f9
@PierreBdR PierreBdR pushed a commit to PierreBdR/statsmodels that referenced this issue Sep 2, 2014
@josef-pkt josef-pkt TST: lower precision for normality tests, see #1113 7e4a911
@PierreBdR PierreBdR pushed a commit to PierreBdR/statsmodels that referenced this issue Sep 2, 2014
@josef-pkt josef-pkt TST lower precision in test_pca_svd closes #1113
    (lowering all by one, I cannot check)
943411a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment