facebook / prophet

Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth.
https://facebook.github.io/prophet
MIT License
18.27k stars 4.51k forks source link

Fall back to Newton algorithm is slow #1854

Open tommasogallingani opened 3 years ago

tommasogallingani commented 3 years ago

During model fitting using LBFGS algorithm the optimization failed and the method fall back Newton is used. 'Optimization terminated abnormally. Falling back to Newton.'

Two main issues:

bletham commented 3 years ago

This is correct, it is not possible to send different fit kwargs to the initial fit and to the Newton fallback.

In the new v1.0 release, you can disable the Newton fallback as described here: #1678

You could then catch the RuntimeError yourself (this one: https://github.com/facebook/prophet/blob/c72ed7abcd0321c51bbf82ad504ddffac9a4c18f/python/prophet/models.py#L265 ) and have a custom fallback, like re-doing fit with Newton but with a different number of iter.