Mark knownfails #1134

Closed
jseabold opened this Issue Oct 21, 2013 · 21 comments

Projects

None yet

4 participants

@jseabold
Member

I keep getting these errors running the test suite that I think are with newer scipy. I think it has to do with fmin_slsqp or similar. Discussed before, but I don't see the ticket now. Might be nice to mark these as known failures.

@josef-pkt
Member

which "errors"?

There were some errors with fmin_slsqp, but Ralf said that they were because of a bug in the Bento build and shouldn't be there otherwise.
These problems were only discussed on the mailing list, I didn't put them in an issue, AFAIR.

I don't have scipy 0.13 installed yet.

@rgommers
Member

I'm getting more errors and failures now with numpy/scipy master. Only the ProbitL1 and AlphaL1 failures should be dependent on Bento (last time I checked):

======================================================================
ERROR: test suite for <class 'statsmodels.discrete.tests.test_discrete.TestPoissonL1Compatability'>
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/rgommers/.local/lib/python2.7/site-packages/nose/suite.py", line 208, in run
    self.setUp()
  File "/home/rgommers/.local/lib/python2.7/site-packages/nose/suite.py", line 291, in setUp
    self.setupContext(ancestor)
  File "/home/rgommers/.local/lib/python2.7/site-packages/nose/suite.py", line 314, in setupContext
    try_run(context, names)
  File "/home/rgommers/.local/lib/python2.7/site-packages/nose/util.py", line 469, in try_run
    return func()
  File "/home/rgommers/Code/statsmodels/statsmodels/discrete/tests/test_discrete.py", line 582, in setupClass
    trim_mode='auto')
  File "/home/rgommers/Code/statsmodels/statsmodels/discrete/discrete_model.py", line 756, in fit_regularized
    size_trim_tol=size_trim_tol, qc_tol=qc_tol, **kwargs)
  File "/home/rgommers/Code/statsmodels/statsmodels/discrete/discrete_model.py", line 312, in fit_regularized
    cov_params_func=cov_params_func, **kwargs)
  File "/home/rgommers/Code/statsmodels/statsmodels/base/model.py", line 363, in fit
    Hinv = cov_params_func(self, xopt, retvals)
  File "/home/rgommers/Code/statsmodels/statsmodels/discrete/discrete_model.py", line 332, in cov_params_func_l1
    H_restricted_inv = np.linalg.inv(-H_restricted)
  File "/home/rgommers/Code/numpy/numpy/linalg/linalg.py", line 520, in inv
    ainv = _umath_linalg.inv(a, signature=signature, extobj=extobj)
  File "/home/rgommers/Code/numpy/numpy/linalg/linalg.py", line 90, in _raise_linalgerror_singular
    raise LinAlgError("Singular matrix")
LinAlgError: Singular matrix

======================================================================
ERROR: statsmodels.graphics.tests.test_correlation.test_plot_corr
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/rgommers/.local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/rgommers/Code/numpy/numpy/testing/decorators.py", line 146, in skipper_func
    return f(*args, **kwargs)
  File "/home/rgommers/Code/statsmodels/statsmodels/graphics/tests/test_correlation.py", line 18, in test_plot_corr
    corr_matrix = np.corrcoef(hie_data.data.T)
  File "/home/rgommers/Code/numpy/numpy/lib/function_base.py", line 1899, in corrcoef
    c = cov(x, y, rowvar, bias, ddof)
  File "/home/rgommers/Code/numpy/numpy/lib/function_base.py", line 1814, in cov
    dtype = np.result_type(m, np.float64)
TypeError: data type not understood

======================================================================
ERROR: statsmodels.graphics.tests.test_correlation.test_plot_corr_grid
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/rgommers/.local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/rgommers/Code/numpy/numpy/testing/decorators.py", line 146, in skipper_func
    return f(*args, **kwargs)
  File "/home/rgommers/Code/statsmodels/statsmodels/graphics/tests/test_correlation.py", line 33, in test_plot_corr_grid
    corr_matrix = np.corrcoef(hie_data.data.T)
  File "/home/rgommers/Code/numpy/numpy/lib/function_base.py", line 1899, in corrcoef
    c = cov(x, y, rowvar, bias, ddof)
  File "/home/rgommers/Code/numpy/numpy/lib/function_base.py", line 1814, in cov
    dtype = np.result_type(m, np.float64)
TypeError: data type not understood

======================================================================
ERROR: statsmodels.tsa.tests.test_arima.test_arima_small_data_bug
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/rgommers/.local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/rgommers/Code/statsmodels/statsmodels/tsa/tests/test_arima.py", line 1810, in test_arima_small_data_bug
    assert_raises(ValueError, mod.fit)
  File "/home/rgommers/Code/numpy/numpy/testing/utils.py", line 1022, in assert_raises
    return nose.tools.assert_raises(*args,**kwargs)
  File "/usr/lib/python2.7/unittest/case.py", line 476, in assertRaises
    callableObj(*args, **kwargs)
  File "/home/rgommers/Code/statsmodels/statsmodels/tsa/arima_model.py", line 828, in fit
    start_params = self._fit_start_params((k_ar,k_ma,k), method)
  File "/home/rgommers/Code/statsmodels/statsmodels/tsa/arima_model.py", line 453, in _fit_start_params
    start_params = self._fit_start_params_hr(order)
  File "/home/rgommers/Code/statsmodels/statsmodels/tsa/arima_model.py", line 421, in _fit_start_params_hr
    coefs = GLS(endog[max(p_tmp+q,p):], X).fit().params
  File "/home/rgommers/Code/statsmodels/statsmodels/regression/linear_model.py", line 260, in __init__
    cholsigmainv=cholsigmainv)
  File "/home/rgommers/Code/statsmodels/statsmodels/regression/linear_model.py", line 79, in __init__
    super(RegressionModel, self).__init__(endog, exog, **kwargs)
  File "/home/rgommers/Code/statsmodels/statsmodels/base/model.py", line 136, in __init__
    super(LikelihoodModel, self).__init__(endog, exog, **kwargs)
  File "/home/rgommers/Code/statsmodels/statsmodels/base/model.py", line 52, in __init__
    self.data = handle_data(endog, exog, missing, hasconst, **kwargs)
  File "/home/rgommers/Code/statsmodels/statsmodels/base/data.py", line 397, in handle_data
    return klass(endog, exog=exog, missing=missing, hasconst=hasconst, **kwargs)
  File "/home/rgommers/Code/statsmodels/statsmodels/base/data.py", line 78, in __init__
    self._check_integrity()
  File "/home/rgommers/Code/statsmodels/statsmodels/base/data.py", line 246, in _check_integrity
    if len(self.exog) != len(self.endog):
TypeError: len() of unsized object

======================================================================
FAIL: statsmodels.discrete.tests.test_discrete.TestProbitL1.test_aic
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/rgommers/.local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/rgommers/Code/statsmodels/statsmodels/discrete/tests/test_discrete.py", line 414, in test_aic
    self.res1.aic, self.res2.aic, DECIMAL_3)
  File "/home/rgommers/Code/numpy/numpy/testing/utils.py", line 472, in assert_almost_equal
    raise AssertionError(_build_err_msg())
AssertionError: 
Arrays are not almost equal to 3 decimals
 ACTUAL: 44.361419555836498
 DESIRED: 38.39977387754293

======================================================================
FAIL: statsmodels.discrete.tests.test_discrete.TestProbitL1.test_bic
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/rgommers/.local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/rgommers/Code/statsmodels/statsmodels/discrete/tests/test_discrete.py", line 418, in test_bic
    self.res1.bic, self.res2.bic, DECIMAL_3)
  File "/home/rgommers/Code/numpy/numpy/testing/utils.py", line 472, in assert_almost_equal
    raise AssertionError(_build_err_msg())
AssertionError: 
Arrays are not almost equal to 3 decimals
 ACTUAL: 44.361419555836498
 DESIRED: 42.796981585942106

======================================================================
FAIL: statsmodels.discrete.tests.test_discrete.TestProbitL1.test_bse
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/rgommers/.local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/rgommers/Code/statsmodels/statsmodels/discrete/tests/test_discrete.py", line 406, in test_bse
    assert_almost_equal(self.res1.bse, self.res2.bse, DECIMAL_4)
  File "/home/rgommers/Code/numpy/numpy/testing/utils.py", line 456, in assert_almost_equal
    return assert_array_almost_equal(actual, desired, decimal, err_msg)
  File "/home/rgommers/Code/numpy/numpy/testing/utils.py", line 813, in assert_array_almost_equal
    header=('Arrays are not almost equal to %d decimals' % decimal))
  File "/home/rgommers/Code/numpy/numpy/testing/utils.py", line 609, in assert_array_compare
    chk_same_position(x_isnan, y_isnan, hasval='nan')
  File "/home/rgommers/Code/numpy/numpy/testing/utils.py", line 589, in chk_same_position
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 4 decimals

x and y nan location mismatch:
 x: array([ nan,  nan,  nan,  nan])
 y: array([ 2.05922641,  0.61889778,  0.07383875,         nan])

======================================================================
FAIL: statsmodels.discrete.tests.test_discrete.TestProbitL1.test_conf_int
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/rgommers/.local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/rgommers/Code/statsmodels/statsmodels/discrete/tests/test_discrete.py", line 403, in test_conf_int
    self.res1.conf_int(), self.res2.conf_int, DECIMAL_4)
  File "/home/rgommers/Code/numpy/numpy/testing/utils.py", line 456, in assert_almost_equal
    return assert_array_almost_equal(actual, desired, decimal, err_msg)
  File "/home/rgommers/Code/numpy/numpy/testing/utils.py", line 813, in assert_array_almost_equal
    header=('Arrays are not almost equal to %d decimals' % decimal))
  File "/home/rgommers/Code/numpy/numpy/testing/utils.py", line 609, in assert_array_compare
    chk_same_position(x_isnan, y_isnan, hasval='nan')
  File "/home/rgommers/Code/numpy/numpy/testing/utils.py", line 589, in chk_same_position
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 4 decimals

x and y nan location mismatch:
 x: array([[ nan,  nan],
       [ nan,  nan],
       [ nan,  nan],
       [ nan,  nan]])
 y: array([[-9.44077951, -1.36876033],
       [ 0.03716721,  2.46320194],
       [-0.09727571,  0.19216687],
       [        nan,         nan]])

======================================================================
FAIL: statsmodels.discrete.tests.test_discrete.TestProbitL1.test_cov_params
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/rgommers/.local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/rgommers/Code/statsmodels/statsmodels/discrete/tests/test_discrete.py", line 436, in test_cov_params
    self.res1.cov_params(), self.res2.cov_params, DECIMAL_4)
  File "/home/rgommers/Code/numpy/numpy/testing/utils.py", line 456, in assert_almost_equal
    return assert_array_almost_equal(actual, desired, decimal, err_msg)
  File "/home/rgommers/Code/numpy/numpy/testing/utils.py", line 813, in assert_array_almost_equal
    header=('Arrays are not almost equal to %d decimals' % decimal))
  File "/home/rgommers/Code/numpy/numpy/testing/utils.py", line 609, in assert_array_compare
    chk_same_position(x_isnan, y_isnan, hasval='nan')
  File "/home/rgommers/Code/numpy/numpy/testing/utils.py", line 589, in chk_same_position
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 4 decimals

x and y nan location mismatch:
 x: array([[ nan,  nan,  nan,  nan],
       [ nan,  nan,  nan,  nan],
       [ nan,  nan,  nan,  nan],
       [ nan,  nan,  nan,  nan]])
 y: array([[ 4.24041339, -0.83432592, -0.06827915,         nan],
       [-0.83432592,  0.38303447, -0.01700249,         nan],
       [-0.06827915, -0.01700249,  0.00545216,         nan],
       [        nan,         nan,         nan,         nan]])

======================================================================
FAIL: statsmodels.discrete.tests.test_discrete.TestProbitL1.test_nnz_params
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/rgommers/.local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/rgommers/Code/statsmodels/statsmodels/discrete/tests/test_discrete.py", line 410, in test_nnz_params
    self.res1.nnz_params, self.res2.nnz_params, DECIMAL_4)
  File "/home/rgommers/Code/numpy/numpy/testing/utils.py", line 472, in assert_almost_equal
    raise AssertionError(_build_err_msg())
AssertionError: 
Arrays are not almost equal to 4 decimals
 ACTUAL: 0
 DESIRED: 3

======================================================================
FAIL: statsmodels.discrete.tests.test_discrete.TestProbitL1.test_params
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/rgommers/.local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/rgommers/Code/statsmodels/statsmodels/discrete/tests/test_discrete.py", line 399, in test_params
    assert_almost_equal(self.res1.params, self.res2.params, DECIMAL_4)
  File "/home/rgommers/Code/numpy/numpy/testing/utils.py", line 456, in assert_almost_equal
    return assert_array_almost_equal(actual, desired, decimal, err_msg)
  File "/home/rgommers/Code/numpy/numpy/testing/utils.py", line 813, in assert_array_almost_equal
    header=('Arrays are not almost equal to %d decimals' % decimal))
  File "/home/rgommers/Code/numpy/numpy/testing/utils.py", line 646, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 4 decimals

(mismatch 75.0%)
 x: array([ 0.,  0.,  0.,  0.])
 y: array([-5.40476992,  1.25018458,  0.04744558,  0.        ])

======================================================================
FAIL: statsmodels.discrete.tests.test_discrete.TestSweepAlphaL1.test_sweep_alpha
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/rgommers/.local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/rgommers/Code/statsmodels/statsmodels/discrete/tests/test_discrete.py", line 514, in test_sweep_alpha
    assert_almost_equal(res2.params, self.res1.params[i], DECIMAL_4)
  File "/home/rgommers/Code/numpy/numpy/testing/utils.py", line 456, in assert_almost_equal
    return assert_array_almost_equal(actual, desired, decimal, err_msg)
  File "/home/rgommers/Code/numpy/numpy/testing/utils.py", line 813, in assert_array_almost_equal
    header=('Arrays are not almost equal to %d decimals' % decimal))
  File "/home/rgommers/Code/numpy/numpy/testing/utils.py", line 646, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 4 decimals

(mismatch 100.0%)
 x: array([-4235.77774671,  1040.75041255,     5.34093705,   936.86867127])
 y: array([-10.37593611,   2.27080968,   0.06670638,   2.05723691])

======================================================================
FAIL: statsmodels.tsa.tests.test_ar.TestARMLEConstant.test_dynamic_predict
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/rgommers/.local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/rgommers/Code/statsmodels/statsmodels/tsa/tests/test_ar.py", line 160, in test_dynamic_predict
    assert_allclose(fv, res2.fcdyn[start:end+1], rtol=rtol)
  File "/home/rgommers/Code/numpy/numpy/testing/utils.py", line 1183, in assert_allclose
    verbose=verbose, header=header)
  File "/home/rgommers/Code/numpy/numpy/testing/utils.py", line 646, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Not equal to tolerance rtol=8e-06, atol=0

(mismatch 100.0%)
 x: array([ 11.23051887,  13.23741132,  19.6642167 ,  27.00389831,
        33.57874925,  44.90798519,  47.95879166,  45.09359026,
        36.50668011,  28.7883086 ,  23.48726862,  22.53224379,...
 y: array([ 11.23047,  13.23731,  19.66407,  27.00373,  33.57858,  44.90784,
        47.95866,  45.09347,  36.50656,  28.78818,  23.48711,  22.53206,
        25.68737,  31.07822,  38.54836,  45.41845,  49.67139,  49.37283,...

----------------------------------------------------------------------
Ran 2825 tests in 165.499s

FAILED (SKIP=19, errors=4, failures=9)
@josef-pkt
Member

Is this with the bento build, or with the 0.13 release build?

@rgommers
Member

Current master + Bento. I'll repeat with v0.13.0

@rgommers
Member

With v0.13.0 and distutils build there are 3 errors left:

======================================================================
ERROR: statsmodels.graphics.tests.test_correlation.test_plot_corr
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/rgommers/.local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/rgommers/Code/numpy/numpy/testing/decorators.py", line 146, in skipper_func
    return f(*args, **kwargs)
  File "/home/rgommers/Code/statsmodels/statsmodels/graphics/tests/test_correlation.py", line 18, in test_plot_corr
    corr_matrix = np.corrcoef(hie_data.data.T)
  File "/home/rgommers/Code/numpy/numpy/lib/function_base.py", line 1899, in corrcoef
    c = cov(x, y, rowvar, bias, ddof)
  File "/home/rgommers/Code/numpy/numpy/lib/function_base.py", line 1814, in cov
    dtype = np.result_type(m, np.float64)
TypeError: data type not understood

======================================================================
ERROR: statsmodels.graphics.tests.test_correlation.test_plot_corr_grid
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/rgommers/.local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/rgommers/Code/numpy/numpy/testing/decorators.py", line 146, in skipper_func
    return f(*args, **kwargs)
  File "/home/rgommers/Code/statsmodels/statsmodels/graphics/tests/test_correlation.py", line 33, in test_plot_corr_grid
    corr_matrix = np.corrcoef(hie_data.data.T)
  File "/home/rgommers/Code/numpy/numpy/lib/function_base.py", line 1899, in corrcoef
    c = cov(x, y, rowvar, bias, ddof)
  File "/home/rgommers/Code/numpy/numpy/lib/function_base.py", line 1814, in cov
    dtype = np.result_type(m, np.float64)
TypeError: data type not understood

======================================================================
ERROR: statsmodels.tsa.tests.test_arima.test_arima_small_data_bug
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/rgommers/.local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/rgommers/Code/statsmodels/statsmodels/tsa/tests/test_arima.py", line 1810, in test_arima_small_data_bug
    assert_raises(ValueError, mod.fit)
  File "/home/rgommers/Code/numpy/numpy/testing/utils.py", line 1022, in assert_raises
    return nose.tools.assert_raises(*args,**kwargs)
  File "/usr/lib/python2.7/unittest/case.py", line 476, in assertRaises
    callableObj(*args, **kwargs)
  File "/home/rgommers/Code/statsmodels/statsmodels/tsa/arima_model.py", line 828, in fit
    start_params = self._fit_start_params((k_ar,k_ma,k), method)
  File "/home/rgommers/Code/statsmodels/statsmodels/tsa/arima_model.py", line 453, in _fit_start_params
    start_params = self._fit_start_params_hr(order)
  File "/home/rgommers/Code/statsmodels/statsmodels/tsa/arima_model.py", line 421, in _fit_start_params_hr
    coefs = GLS(endog[max(p_tmp+q,p):], X).fit().params
  File "/home/rgommers/Code/statsmodels/statsmodels/regression/linear_model.py", line 260, in __init__
    cholsigmainv=cholsigmainv)
  File "/home/rgommers/Code/statsmodels/statsmodels/regression/linear_model.py", line 79, in __init__
    super(RegressionModel, self).__init__(endog, exog, **kwargs)
  File "/home/rgommers/Code/statsmodels/statsmodels/base/model.py", line 136, in __init__
    super(LikelihoodModel, self).__init__(endog, exog, **kwargs)
  File "/home/rgommers/Code/statsmodels/statsmodels/base/model.py", line 52, in __init__
    self.data = handle_data(endog, exog, missing, hasconst, **kwargs)
  File "/home/rgommers/Code/statsmodels/statsmodels/base/data.py", line 397, in handle_data
    return klass(endog, exog=exog, missing=missing, hasconst=hasconst, **kwargs)
  File "/home/rgommers/Code/statsmodels/statsmodels/base/data.py", line 78, in __init__
    self._check_integrity()
  File "/home/rgommers/Code/statsmodels/statsmodels/base/data.py", line 246, in _check_integrity
    if len(self.exog) != len(self.endog):
TypeError: len() of unsized object

----------------------------------------------------------------------
Ran 2831 tests in 164.897s

FAILED (SKIP=19, errors=3)
@josef-pkt
Member

None of them look scipy related. So, that looks fine.

Is there a change in behavior of np.result_type in numpy? which numpy version are you using?

I have no idea about the last error.

@rgommers
Member

It shouldn't have changed, but I wouldn't be surprised. I don't have a 1.6.x or 1.7.x stack at hand to test, and pandas doesn't work with 1.5.1

@josef-pkt
Member

@rgommers

What pandas version are you using?

It looks like the np.result_type error is between pandas and numpy, if I interpret your traceback correctly.

can you try the following?

from statsmodels.datasets import randhie
hie_data = randhie.load_pandas()
corr_matrix = np.corrcoef(hie_data.data.T)
>>> from statsmodels.datasets import randhie
>>> hie_data = randhie.load_pandas()
>>> corr_matrix = np.corrcoef(hie_data.data.T)
>>> corr_matrix[:4, :4]
array([[ 1.        , -0.06967143, -0.05095105, -0.01656728],
       [-0.06967143,  1.        , -0.24799029,  0.4046663 ],
       [-0.05095105, -0.24799029,  1.        ,  0.12108686],
       [-0.01656728,  0.4046663 ,  0.12108686,  1.        ]])
@josef-pkt
Member

@jseabold Can you look at the test_arima.test_arima_small_data_bug error?

@jseabold
Member

Yes. I'll look into that. I don't see it though. I'd prefer to merge the pending bug fix PRs in ARIMA first. I also don't see the other latest ones reported by @rgommers. I do see the ones that should be bento-dependent, only I'm not using bento. Maybe this is an openblas issue?

======================================================================           
ERROR: test suite for <class 'statsmodels.discrete.tests.test_discrete.TestPoissonL1Compatability'>                                                               
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 208, in run
    self.setUp()
  File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 291, in setUp
    self.setupContext(ancestor)
  File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 314, in setupContext
    try_run(context, names)
  File "/usr/local/lib/python2.7/dist-packages/nose/util.py", line 478, in try_run
    return func()
  File "/home/skipper/statsmodels/statsmodels-skipper/statsmodels/discrete/tests/test_discrete.py", line 582, in setupClass
    trim_mode='auto')
  File "/home/skipper/statsmodels/statsmodels-skipper/statsmodels/discrete/discrete_model.py", line 756, in fit_regularized
    size_trim_tol=size_trim_tol, qc_tol=qc_tol, **kwargs)
  File "/home/skipper/statsmodels/statsmodels-skipper/statsmodels/discrete/discrete_model.py", line 312, in fit_regularized
    cov_params_func=cov_params_func, **kwargs)
  File "/home/skipper/statsmodels/statsmodels-skipper/statsmodels/base/model.py", line 370, in fit
    Hinv = cov_params_func(self, xopt, retvals)
  File "/home/skipper/statsmodels/statsmodels-skipper/statsmodels/discrete/discrete_model.py", line 332, in cov_params_func_l1
    H_restricted_inv = np.linalg.inv(-H_restricted)
  File "/usr/local/lib/python2.7/dist-packages/numpy/linalg/linalg.py", line 519, in inv
    ainv = _umath_linalg.inv(a, signature=signature, extobj=extobj)
  File "/usr/local/lib/python2.7/dist-packages/numpy/linalg/linalg.py", line 90, in _raise_linalgerror_singular
    raise LinAlgError("Singular matrix")
LinAlgError: Singular matrix

======================================================================
ERROR: statsmodels.discrete.tests.test_discrete.TestSweepAlphaL1.test_sweep_alpha
----------------------------------------------------------------------
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/discrete/tests/test_discrete.py", line 513, in test_sweep_alpha
    trim_mode='off', maxiter=1000)
  File "/home/skipper/statsmodels/statsmodels-skipper/statsmodels/discrete/discrete_model.py", line 390, in fit_regularized
    size_trim_tol=size_trim_tol, qc_tol=qc_tol, **kwargs)
  File "/home/skipper/statsmodels/statsmodels-skipper/statsmodels/discrete/discrete_model.py", line 312, in fit_regularized
    cov_params_func=cov_params_func, **kwargs)
  File "/home/skipper/statsmodels/statsmodels-skipper/statsmodels/base/model.py", line 370, in fit
    Hinv = cov_params_func(self, xopt, retvals)
  File "/home/skipper/statsmodels/statsmodels-skipper/statsmodels/discrete/discrete_model.py", line 332, in cov_params_func_l1
    H_restricted_inv = np.linalg.inv(-H_restricted)
  File "/usr/local/lib/python2.7/dist-packages/numpy/linalg/linalg.py", line 519, in inv
    ainv = _umath_linalg.inv(a, signature=signature, extobj=extobj)
  File "/usr/local/lib/python2.7/dist-packages/numpy/linalg/linalg.py", line 90, in _raise_linalgerror_singular
    raise LinAlgError("Singular matrix")
LinAlgError: Singular matrix
-------------------- >> begin captured stdout << ---------------------
QC check did not pass for 4 out of 4 parameters
Try increasing solver accuracy or number of iterations, decreasing alpha, or switch solvers

--------------------- >> end captured stdout << ----------------------

======================================================================
FAIL: statsmodels.discrete.tests.test_discrete.TestProbitL1.test_aic
----------------------------------------------------------------------
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/discrete/tests/test_discrete.py", line 414, in test_aic
    self.res1.aic, self.res2.aic, DECIMAL_3)
  File "/usr/local/lib/python2.7/dist-packages/numpy/testing/utils.py", line 470, in assert_almost_equal
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 3 decimals
 ACTUAL: 44.36141955583647
 DESIRED: 38.39977387754293

======================================================================
FAIL: statsmodels.discrete.tests.test_discrete.TestProbitL1.test_bic
----------------------------------------------------------------------
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/discrete/tests/test_discrete.py", line 418, in test_bic
    self.res1.bic, self.res2.bic, DECIMAL_3)
  File "/usr/local/lib/python2.7/dist-packages/numpy/testing/utils.py", line 470, in assert_almost_equal
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 3 decimals
 ACTUAL: 44.36141955583647
 DESIRED: 42.796981585942106

======================================================================
FAIL: statsmodels.discrete.tests.test_discrete.TestProbitL1.test_bse
----------------------------------------------------------------------
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/discrete/tests/test_discrete.py", line 406, in test_bse
    assert_almost_equal(self.res1.bse, self.res2.bse, DECIMAL_4)
  File "/usr/local/lib/python2.7/dist-packages/numpy/testing/utils.py", line 454, in assert_almost_equal
    return assert_array_almost_equal(actual, desired, decimal, err_msg)
  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 607, in assert_array_compare
    chk_same_position(x_isnan, y_isnan, hasval='nan')
  File "/usr/local/lib/python2.7/dist-packages/numpy/testing/utils.py", line 587, in chk_same_position
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 4 decimals

x and y nan location mismatch:
 x: array([ nan,  nan,  nan,  nan])
 y: array([ 2.05922641,  0.61889778,  0.07383875,         nan])

======================================================================
FAIL: statsmodels.discrete.tests.test_discrete.TestProbitL1.test_conf_int
----------------------------------------------------------------------
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/discrete/tests/test_discrete.py", line 403, in test_conf_int
    self.res1.conf_int(), self.res2.conf_int, DECIMAL_4)
  File "/usr/local/lib/python2.7/dist-packages/numpy/testing/utils.py", line 454, in assert_almost_equal
    return assert_array_almost_equal(actual, desired, decimal, err_msg)
  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 607, in assert_array_compare
    chk_same_position(x_isnan, y_isnan, hasval='nan')
  File "/usr/local/lib/python2.7/dist-packages/numpy/testing/utils.py", line 587, in chk_same_position
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 4 decimals

x and y nan location mismatch:
 x: array([[ nan,  nan],
       [ nan,  nan],
       [ nan,  nan],
       [ nan,  nan]])
 y: array([[-9.44077951, -1.36876033],
       [ 0.03716721,  2.46320194],
       [-0.09727571,  0.19216687],
       [        nan,         nan]])

======================================================================
FAIL: statsmodels.discrete.tests.test_discrete.TestProbitL1.test_cov_params
----------------------------------------------------------------------
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/discrete/tests/test_discrete.py", line 436, in test_cov_params
    self.res1.cov_params(), self.res2.cov_params, DECIMAL_4)
  File "/usr/local/lib/python2.7/dist-packages/numpy/testing/utils.py", line 454, in assert_almost_equal
    return assert_array_almost_equal(actual, desired, decimal, err_msg)
  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 607, in assert_array_compare
    chk_same_position(x_isnan, y_isnan, hasval='nan')
  File "/usr/local/lib/python2.7/dist-packages/numpy/testing/utils.py", line 587, in chk_same_position
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 4 decimals

x and y nan location mismatch:
 x: array([[ nan,  nan,  nan,  nan],
       [ nan,  nan,  nan,  nan],
       [ nan,  nan,  nan,  nan],
       [ nan,  nan,  nan,  nan]])
 y: array([[ 4.24041339, -0.83432592, -0.06827915,         nan],
       [-0.83432592,  0.38303447, -0.01700249,         nan],
       [-0.06827915, -0.01700249,  0.00545216,         nan],
       [        nan,         nan,         nan,         nan]])

======================================================================
FAIL: statsmodels.discrete.tests.test_discrete.TestProbitL1.test_nnz_params
----------------------------------------------------------------------
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/discrete/tests/test_discrete.py", line 410, in test_nnz_params
    self.res1.nnz_params, self.res2.nnz_params, DECIMAL_4)
  File "/usr/local/lib/python2.7/dist-packages/numpy/testing/utils.py", line 470, in assert_almost_equal
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 4 decimals
 ACTUAL: 0
 DESIRED: 3

======================================================================
FAIL: statsmodels.discrete.tests.test_discrete.TestProbitL1.test_params
----------------------------------------------------------------------
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/discrete/tests/test_discrete.py", line 399, in test_params
    assert_almost_equal(self.res1.params, self.res2.params, DECIMAL_4)
  File "/usr/local/lib/python2.7/dist-packages/numpy/testing/utils.py", line 454, in assert_almost_equal
    return assert_array_almost_equal(actual, desired, decimal, err_msg)
  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 4 decimals

(mismatch 75.0%)
 x: array([ 0.,  0.,  0.,  0.])
 y: array([-5.40476992,  1.25018458,  0.04744558,  0.        ])

======================================================================
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]])

The last just looks like a precision issue with my openblas build.

@jseabold
Member

@rgommers Can you post the output of statsmodels/tools/print_version.py?

@jseabold
Member

For the record

INSTALLED VERSIONS
------------------
Python: 2.7.4.final.0
OS: Linux 3.5.0-36-generic #57-Ubuntu SMP Wed Jun 19 15:10:49 UTC 2013 x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8

Statsmodels
===========

Installed: 0.6.0.dev-0816c54 (/usr/local/lib/python2.7/dist-packages/statsmodels-0.6.0-py2.7-linux-x86_64.egg/statsmodels)

Required Dependencies
=====================                                                            

cython: 0.19.1 (/home/skipper/.local/lib/python2.7/site-packages/Cython)         
numpy: 1.9.0.dev-b5dab6d (/usr/local/lib/python2.7/dist-packages/numpy)          
scipy: 0.14.0.dev-ba387ba (/usr/local/lib/python2.7/dist-packages/scipy)         
pandas: 0.12.0-658-g5caf660 (/usr/local/lib/python2.7/dist-packages/pandas-0.12.0_658_g5caf660-py2.7-linux-x86_64.egg/pandas)                                     
    dateutil: 2.1 (/usr/local/lib/python2.7/dist-packages/dateutil)              
patsy: 0.2.1+dev (/usr/local/lib/python2.7/dist-packages/patsy-0.2.1_dev-py2.7.egg/patsy)                                                                         

Optional Dependencies                                                            
=====================                                                            

matplotlib: 1.4.x (/usr/local/lib/python2.7/dist-packages/matplotlib-1.4.x-py2.7-linux-x86_64.egg/matplotlib)                                                     
cvxopt: 1.1.5 (/usr/local/lib/python2.7/dist-packages/cvxopt)                    

Developer Tools                                                                  
================                                                                 

IPython: 1.1.0 (/usr/local/lib/python2.7/dist-packages/IPython)                  
    jinja2: 2.7 (/home/skipper/.local/lib/python2.7/site-packages/jinja2)        
sphinx: 1.2b3 (/usr/local/lib/python2.7/dist-packages/Sphinx-1.2b3-py2.7.egg/sphinx)                                                                              
    pygments: 1.6 (/usr/lib/python2.7/dist-packages/pygments)                    
nose: 1.2.1 (/usr/local/lib/python2.7/dist-packages/nose)
virtualenv: 1.9.1 (/usr/local/lib/python2.7/dist-packages)
@jseabold
Member

Tangentially related but I silenced one of the warnings in the test suite with 549a671 if that's also bugging anyone else.

@jseabold
Member

@rgommers Also, are you on 32-bit? This seems to be related to 32-bit and pandas 12.0 so far. #1046

@rgommers
Member

yes, 32-bit

@rgommers
Member
INSTALLED VERSIONS
------------------
Python: 2.7.4.final.0
OS: Linux 3.8.0-32-generic #47-Ubuntu SMP Tue Oct 1 21:36:40 UTC 2013 i686
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8

Statsmodels
===========

Installed: 0.6.0.dev-3b7082c (/home/rgommers/Code/statsmodels/statsmodels)

Required Dependencies
=====================

cython: 0.17.1 (/home/rgommers/.local/lib/python2.7/site-packages/Cython)
numpy: 1.9.0.dev-bf2ffe9 (/home/rgommers/Code/numpy/numpy)
scipy: 0.13.0 (/home/rgommers/Code/scipy/scipy)
pandas: 0.10.0b1 (/home/rgommers/.local/lib/python2.7/site-packages/pandas-0.10.0b1-py2.7-linux-i686.egg/pandas)
    dateutil: 1.5 (/usr/lib/python2.7/dist-packages/dateutil)
patsy: 0.1.0 (/home/rgommers/.local/lib/python2.7/site-packages/patsy)

Optional Dependencies
=====================

matplotlib: 1.3.0 (/home/rgommers/.local/lib/python2.7/site-packages/matplotlib)
cvxopt: Not installed

Developer Tools
================

IPython: 0.13.2 (/usr/lib/python2.7/dist-packages/IPython)
    jinja2: 2.6 (/usr/lib/python2.7/dist-packages/jinja2)
sphinx: 1.1.3 (/usr/lib/python2.7/dist-packages/sphinx)
    pygments: 1.6 (/usr/lib/python2.7/dist-packages/pygments)
nose: 1.3.0 (/home/rgommers/.local/lib/python2.7/site-packages/nose)
virtualenv: 1.9.1 (/home/rgommers/.local/lib/python2.7/site-packages)
@jseabold jseabold added this to the 0.5.1 milestone Feb 7, 2014
@jseabold
Member
jseabold commented Feb 7, 2014

Are we still seeing these? I don't have my chroot environment setup anymore. Added milestone 0.5.1 for checking again when we do the next bugfix release.

@jseabold
Member
jseabold commented Apr 6, 2014

Anyone still seeing any of these? I know several of these bugs have been fixed. Not sure about the L1 problems or pca.

@josef-pkt
Member

I haven't heard about any of these in a while. I guess they are all gone.

@josef-pkt josef-pkt closed this Apr 14, 2014
@argriffing

Has statsmodels been tested against bento-built scipy recently? I want to say this is just out of curiosity, but actually I'm wondering how much effort to spend to keep scipy compatible with bento.

@josef-pkt
Member

@argriffing I have no information at all. I never build scipy anymore, and I never built it with bento.
All our test servers use either Ubuntu or Debian or Conda packages for all dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment