فهرست منبع

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