浏览代码

Merge branch 'v0.2' of https://github.com/facebookincubator/prophet into v0.2

bl 8 年之前
父节点
当前提交
3060536563
共有 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

@@ -644,7 +644,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