Repository navigation
Closed
Milestone
Description
I'm trying to fit an ARIMA model to my uig_factor dataset: a pandas timeseries object. This seems to work on my local machine and in docker, but causes faults in the same docker image on the server.
When executing the following code:
uig_factor = uig_factor[uig_factor['OvoUigFactor'].isnull() == False].set_index('GasFlowDate')
fit = ARIMA(uig_factor, order=(7, 1, 0)).fit(disp=0)
I get this stack trace:
File "/root/gas_forecast/gas_forecast/uig.py", line 190, in uig_factor_arima
fit = ARIMA(uig_factor, order=(7, 1, 0)).fit(disp=0)
File "/usr/local/lib/python3.6/site-packages/statsmodels/tsa/arima_model.py", line 1157, in fit
callback, start_ar_lags, **kwargs)
File "/usr/local/lib/python3.6/site-packages/statsmodels/tsa/arima_model.py", line 959, in fit
callback=callback, **kwargs)
File "/usr/local/lib/python3.6/site-packages/statsmodels/base/model.py", line 466, in fit
full_output=full_output)
File "/usr/local/lib/python3.6/site-packages/statsmodels/base/optimizer.py", line 191, in _fit
hess=hessian)
File "/usr/local/lib/python3.6/site-packages/statsmodels/base/optimizer.py", line 410, in _fit_lbfgs
**extra_kwargs)
File "/usr/local/lib/python3.6/site-packages/scipy/optimize/lbfgsb.py", line 199, in fmin_l_bfgs_b
**opts)
File "/usr/local/lib/python3.6/site-packages/scipy/optimize/lbfgsb.py", line 335, in _minimize_lbfgsb
f, g = func_and_grad(x)
File "/usr/local/lib/python3.6/site-packages/scipy/optimize/lbfgsb.py", line 280, in func_and_grad
f = fun(x, *args)
File "/usr/local/lib/python3.6/site-packages/scipy/optimize/optimize.py", line 293, in function_wrapper
return function(*(wrapper_args + args))
File "/usr/local/lib/python3.6/site-packages/statsmodels/base/model.py", line 440, in f
return -self.loglike(params, *args) / nobs
File "/usr/local/lib/python3.6/site-packages/statsmodels/tsa/arima_model.py", line 780, in loglike
return self.loglike_kalman(params, set_sigma2)
File "/usr/local/lib/python3.6/site-packages/statsmodels/tsa/arima_model.py", line 790, in loglike_kalman
return KalmanFilter.loglike(params, self, set_sigma2)
File "/usr/local/lib/python3.6/site-packages/statsmodels/tsa/kalmanf/kalmanfilter.py", line 649, in loglike
R_mat, T_mat)
File "kalman_loglike.pyx", line 342, in statsmodels.tsa.kalmanf.kalman_loglike.kalman_loglike_double
File "kalman_loglike.pyx", line 74, in statsmodels.tsa.kalmanf.kalman_loglike.kalman_filter_double
File "/usr/local/lib/python3.6/site-packages/numpy/linalg/linalg.py", line 1872, in pinv
u, s, vt = svd(a, full_matrices=False)
File "/usr/local/lib/python3.6/site-packages/numpy/linalg/linalg.py", line 1562, in svd
u, s, vh = gufunc(a, signature=signature, extobj=extobj)
ValueError: On entry to DLASCL parameter number 4 had an illegal value
I have openblas but not mkl installed
Metadata
Metadata
Assignees
Labels
No labels
Activity
ChadFulton commentedon Nov 26, 2018
I think this usually happens when you have a
NaNor aninfvalue in your endog.ChadFulton commentedon Nov 26, 2018
If not, then I guess this is an issue with OpenBLAS - in any case, the error is occuring at a lower level than statsmodels itself.
samyoung17 commentedon Nov 27, 2018
skatsuta commentedon Dec 10, 2018
I recently encountered the same error too when using GLM.
In my case it turned out that upgrading statsmodels from 0.8.0 -> 0.9.0 seems to cause this problem.
Downgrading to 0.8.0 fixed the error.
I don't know the root cause but hope this helps.
Rem py3.5 from test, Require mkl for install
bashtage commentedon Jul 16, 2019
Closing, no action.
YuliaGazizova commentedon Jun 21, 2020
I have the same problem and my data certainly does not contain NaNs or inf
On entry to DLASCL parameter number 4 had an illegal valuestatsmodels 0.11.1
bashtage commentedon Jun 21, 2020
Have you tried
statsmodels.tsa.arima.model.ARIMA. Note the.rather than the_.bashtage commentedon Jun 21, 2020
When this happens I suspect that the LLF is returning a NaN somewhere in the optimization and this then propagates back to the parameters until you get an invalid value.