Explorar o código

Alternative formulation for logistic growth initialization

Ben Letham %!s(int64=8) %!d(string=hai) anos
pai
achega
ff1dbcf38d
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  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