pmdarima: auto_arima's error_action="ignore" does not work when alternative training methods are specified

Describe the bug If I specify error_action="ignore" in auto_arima when method is anything other than the default of CSS-MLE, errors from statsmodels are no longer ignored.

To Reproduce
Execute the following python code (this is using pmdarima 1.5.3)

import pmdarima

y = pmdarima.datasets.load_wineind()
model = pmdarima.auto_arima(y=y, error_action="ignore", suppress_warnings=True, trace=True, method='CSS')

Versions

System: python: 3.6.10 |Anaconda, Inc.| (default, Jan 7 2020, 15:18:16) [MSC v.1916 64 bit (AMD64)] executable: C:\Users\adgustaf\AppData\Local\Continuum\anaconda3\envs\pmdarima_v153\python.exe machine: Windows-10-10.0.18362-SP0

Python dependencies: pip: 20.0.2 setuptools: 46.0.0.post20200309 sklearn: 0.22.2.post1 statsmodels: 0.11.1 numpy: 1.18.1 scipy: 1.4.1 Cython: 0.29.15 pandas: 1.0.1 joblib: 0.14.1 pmdarima: 1.5.3

Expected behavior I expect the training to complete just as when the default method of CSS-MLE is applied.

Actual behavior Fitting fails

Additional context None

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

When I try to run one of those models outside of the auto_arima loop, I get:

ValueError: Unknown fit method css

Your method is invalid. I’ll admit, the confusion is probably the default err message auto_arima is returning. The valid methods are documented here

method : str, optional (default=’lbfgs’)

The method determines which solver from scipy.optimize is used, and it can be chosen from among the following strings:

‘newton’ for Newton-Raphson
‘nm’ for Nelder-Mead
‘bfgs’ for Broyden-Fletcher-Goldfarb-Shanno (BFGS)
‘lbfgs’ for limited-memory BFGS with optional box constraints
‘powell’ for modified Powell’s method
‘cg’ for conjugate gradient
‘ncg’ for Newton-conjugate gradient
‘basinhopping’ for global basin-hopping solver
The explicit arguments in fit are passed to the solver, with the exception of the basin-hopping solver. Each solver has several optional arguments that are not the same across solvers. These can be passed as **fit_kwargs