소스 검색

Fit if constant history and logistic growth

bl 7 년 전
부모
커밋
1b91fa3064
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      python/fbprophet/forecaster.py

+ 4 - 1
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