mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-06-29 03:30:57 +00:00
Document the parameters stored during fitting.
This commit is contained in:
parent
1645e56c48
commit
459e0fed6c
3 changed files with 26 additions and 1 deletions
|
|
@ -454,6 +454,15 @@ logistic_growth_init <- function(df) {
|
|||
|
||||
#' Fit the prophet model.
|
||||
#'
|
||||
#' This sets m$params to contain the fitted model parameters. It is a list
|
||||
#' with the following elements:
|
||||
#' k (M array): M posterior samples of the initial slope.
|
||||
#' m (M array): The initial intercept.
|
||||
#' delta (MxN matrix): The slope change at each of N changepoints.
|
||||
#' beta (MxK matrix): Coefficients for K seasonality features.
|
||||
#' sigma_obs (M array): Noise level.
|
||||
#' Note that M=1 if MAP estimation.
|
||||
#'
|
||||
#' @param m Prophet object.
|
||||
#' @param df Data frame.
|
||||
#' @param ... Additional arguments passed to the \code{optimizing} or
|
||||
|
|
|
|||
|
|
@ -15,6 +15,13 @@ fit.prophet(m, df, ...)
|
|||
\code{sampling} functions in Stan.}
|
||||
}
|
||||
\description{
|
||||
Fit the prophet model.
|
||||
This sets m$params to contain the fitted model parameters. It is a list
|
||||
with the following elements:
|
||||
k (M array): M posterior samples of the initial slope.
|
||||
m (M array): The initial intercept.
|
||||
delta (MxN matrix): The slope change at each of N changepoints.
|
||||
beta (MxK matrix): Coefficients for K seasonality features.
|
||||
sigma_obs (M array): Noise level.
|
||||
Note that M=1 if MAP estimation.
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -457,6 +457,15 @@ class Prophet(object):
|
|||
def fit(self, df, **kwargs):
|
||||
"""Fit the Prophet model.
|
||||
|
||||
This sets self.params to contain the fitted model parameters. It is a
|
||||
dictionary parameter names as keys and the following items:
|
||||
k (Mx1 array): M posterior samples of the initial slope.
|
||||
m (Mx1 array): The initial intercept.
|
||||
delta (MxN array): The slope change at each of N changepoints.
|
||||
beta (MxK matrix): Coefficients for K seasonality features.
|
||||
sigma_obs (Mx1 array): Noise level.
|
||||
Note that M=1 if MAP estimation.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
df: pd.DataFrame containing the history. Must have columns ds (date
|
||||
|
|
|
|||
Loading…
Reference in a new issue