add_regressor.Rd 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/prophet.R
  3. \name{add_regressor}
  4. \alias{add_regressor}
  5. \title{Add an additional regressor to be used for fitting and predicting.}
  6. \usage{
  7. add_regressor(m, name, prior.scale = NULL, standardize = "auto",
  8. mode = NULL)
  9. }
  10. \arguments{
  11. \item{m}{Prophet object.}
  12. \item{name}{String name of the regressor}
  13. \item{prior.scale}{Float scale for the normal prior. If not provided,
  14. holidays.prior.scale will be used.}
  15. \item{standardize}{Bool, specify whether this regressor will be standardized
  16. prior to fitting. Can be 'auto' (standardize if not binary), True, or
  17. False.}
  18. \item{mode}{Optional, 'additive' or 'multiplicative'. Defaults to
  19. m$seasonality.mode.}
  20. }
  21. \value{
  22. The prophet model with the regressor added.
  23. }
  24. \description{
  25. The dataframe passed to `fit` and `predict` will have a column with the
  26. specified name to be used as a regressor. When standardize='auto', the
  27. regressor will be standardized unless it is binary. The regression
  28. coefficient is given a prior with the specified scale parameter.
  29. Decreasing the prior scale will add additional regularization. If no
  30. prior scale is provided, holidays.prior.scale will be used.
  31. Mode can be specified as either 'additive' or 'multiplicative'. If not
  32. specified, m$seasonality.mode will be used. 'additive' means the effect of
  33. the regressor will be added to the trend, 'multiplicative' means it will
  34. multiply the trend.
  35. }