mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-11-17 08:40:56 +00:00
Alternative formulation for logistic growth initialization
This commit is contained in:
parent
c836b520ab
commit
ff1dbcf38d
2 changed files with 2 additions and 2 deletions
|
|
@ -600,7 +600,7 @@ logistic_growth_init <- function(df) {
|
||||||
# Initialize the offset
|
# Initialize the offset
|
||||||
m <- L0 * T / (L0 - L1)
|
m <- L0 * T / (L0 - L1)
|
||||||
# And the rate
|
# And the rate
|
||||||
k <- L0 / m
|
k <- (L0 - L1) / T
|
||||||
return(c(k, m))
|
return(c(k, m))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -523,7 +523,7 @@ class Prophet(object):
|
||||||
# Initialize the offset
|
# Initialize the offset
|
||||||
m = L0 * T / (L0 - L1)
|
m = L0 * T / (L0 - L1)
|
||||||
# And the rate
|
# And the rate
|
||||||
k = L0 / m
|
k = (L0 - L1) / T
|
||||||
return (k, m)
|
return (k, m)
|
||||||
|
|
||||||
# fb-block 7
|
# fb-block 7
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue