diff --git a/R/R/prophet.R b/R/R/prophet.R index fd971a9..337a349 100644 --- a/R/R/prophet.R +++ b/R/R/prophet.R @@ -1257,6 +1257,7 @@ fit.prophet <- function(m, df, ...) { object = model, data = dat, init = stan_init, + algorithm = if(dat$T < 100) {'Newton'} else {'LBFGS'}, iter = 1e4, as_vector = FALSE ) diff --git a/python/fbprophet/forecaster.py b/python/fbprophet/forecaster.py index abd8182..d8096ca 100644 --- a/python/fbprophet/forecaster.py +++ b/python/fbprophet/forecaster.py @@ -1114,6 +1114,7 @@ class Prophet(object): args = dict( data=dat, init=stan_init, + algorithm='Newton' if dat['T'] < 100 else 'LBFGS', iter=1e4, ) args.update(kwargs)