diff --git a/R/R/prophet.R b/R/R/prophet.R index bf4b8f1..5f56196 100644 --- a/R/R/prophet.R +++ b/R/R/prophet.R @@ -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 diff --git a/R/man/fit.prophet.Rd b/R/man/fit.prophet.Rd index fc1151c..9fa0426 100644 --- a/R/man/fit.prophet.Rd +++ b/R/man/fit.prophet.Rd @@ -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. } diff --git a/python/fbprophet/forecaster.py b/python/fbprophet/forecaster.py index 0ea5055..65529be 100644 --- a/python/fbprophet/forecaster.py +++ b/python/fbprophet/forecaster.py @@ -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