From 1b91fa30640fb7a263a4e1ec5b5d18113f2a6ea3 Mon Sep 17 00:00:00 2001 From: bl Date: Wed, 30 May 2018 14:33:04 -0700 Subject: [PATCH] Fit if constant history and logistic growth --- python/fbprophet/forecaster.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/fbprophet/forecaster.py b/python/fbprophet/forecaster.py index be7ed9e..5eb0988 100644 --- a/python/fbprophet/forecaster.py +++ b/python/fbprophet/forecaster.py @@ -980,7 +980,10 @@ class Prophet(object): 'sigma_obs': 1, } - if history['y'].min() == history['y'].max(): + if ( + (history['y'].min() == history['y'].max()) + and self.growth == 'linear' + ): # Nothing to fit. self.params = stan_init() self.params['sigma_obs'] = 1e-9