浏览代码

Alternative formulation for logistic growth initialization

Ben Letham 8 年之前
父节点
当前提交
ff1dbcf38d
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      R/R/prophet.R
  2. 1 1
      python/fbprophet/forecaster.py

+ 1 - 1
R/R/prophet.R

@@ -600,7 +600,7 @@ logistic_growth_init <- function(df) {
   # Initialize the offset
   m <- L0 * T / (L0 - L1)
   # And the rate
-  k <- L0 / m
+  k <- (L0 - L1) / T
   return(c(k, m))
 }
 

+ 1 - 1
python/fbprophet/forecaster.py

@@ -523,7 +523,7 @@ class Prophet(object):
         # Initialize the offset
         m = L0 * T / (L0 - L1)
         # And the rate
-        k = L0 / m
+        k = (L0 - L1) / T
         return (k, m)
 
     # fb-block 7