add_seasonality.Rd 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/prophet.R
  3. \name{add_seasonality}
  4. \alias{add_seasonality}
  5. \title{Add a seasonal component with specified period, number of Fourier
  6. components, and prior scale.}
  7. \usage{
  8. add_seasonality(m, name, period, fourier.order, prior.scale = NULL,
  9. mode = NULL)
  10. }
  11. \arguments{
  12. \item{m}{Prophet object.}
  13. \item{name}{String name of the seasonality component.}
  14. \item{period}{Float number of days in one period.}
  15. \item{fourier.order}{Int number of Fourier components to use.}
  16. \item{prior.scale}{Optional float prior scale for this component.}
  17. \item{mode}{Optional 'additive' or 'multiplicative'.}
  18. }
  19. \value{
  20. The prophet model with the seasonality added.
  21. }
  22. \description{
  23. Increasing the number of Fourier components allows the seasonality to change
  24. more quickly (at risk of overfitting). Default values for yearly and weekly
  25. seasonalities are 10 and 3 respectively.
  26. }
  27. \details{
  28. Increasing prior scale will allow this seasonality component more
  29. flexibility, decreasing will dampen it. If not provided, will use the
  30. seasonality.prior.scale provided on Prophet initialization (defaults to 10).
  31. Mode can be specified as either 'additive' or 'multiplicative'. If not
  32. specified, m$seasonality.mode will be used (defaults to 'additive').
  33. Additive means the seasonality will be added to the trend, multiplicative
  34. means it will multiply the trend.
  35. }