From 44f82f6ea1d3e13f822b3a638e72d9da3857b2db Mon Sep 17 00:00:00 2001 From: Ben Letham Date: Tue, 29 May 2018 15:58:23 -0700 Subject: [PATCH] Add some clarifications to extra regressor documentation --- .../seasonality,_holiday_effects,_and_regressors.ipynb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/notebooks/seasonality,_holiday_effects,_and_regressors.ipynb b/notebooks/seasonality,_holiday_effects,_and_regressors.ipynb index 4bf9a5d..cba4ad7 100644 --- a/notebooks/seasonality,_holiday_effects,_and_regressors.ipynb +++ b/notebooks/seasonality,_holiday_effects,_and_regressors.ipynb @@ -866,7 +866,11 @@ "source": [ "NFL Sundays could also have been handled using the \"holidays\" interface described above, by creating a list of past and future NFL Sundays. The `add_regressor` function provides a more general interface for defining extra linear regressors, and in particular does not require that the regressor be a binary indicator. Another time series could be used as a regressor, although its future values would have to be known. The regressor cannot be constant in the training data; fitting will exit with an error if it is.\n", "\n", - "The `add_regressor` function has optional arguments for specifying the prior scale (holiday prior scale is used by default) and whether or not the regressor is standardized - see the docstring with `help(Prophet.add_regressor)` in Python and `?add_regressor` in R." + "The `add_regressor` function has optional arguments for specifying the prior scale (holiday prior scale is used by default) and whether or not the regressor is standardized - see the docstring with `help(Prophet.add_regressor)` in Python and `?add_regressor` in R. Note that regressors must be added prior to model fitting.\n", + "\n", + "The extra regressor must be known for both the history and for future dates. It thus must either be something that has known future values (such as `nfl_sunday`), or something that has separately been forecasted elsewhere. Prophet will also raise an error if the regressor is constant throughout the history, since there is nothing to fit from it.\n", + "\n", + "Extra regressors are put in the linear component of the model, so the underlying model is that the time series depends on the extra regressor as either an additive or multiplicative factor (see the next section for multiplicativity)." ] } ],