2017-07-05 08:20:22 +00:00
|
|
|
% Generated by roxygen2: do not edit by hand
|
|
|
|
|
% Please edit documentation in R/prophet.R
|
|
|
|
|
\name{add_seasonality}
|
|
|
|
|
\alias{add_seasonality}
|
2017-09-01 17:04:20 +00:00
|
|
|
\title{Add a seasonal component with specified period, number of Fourier
|
|
|
|
|
components, and prior scale.}
|
2017-07-05 08:20:22 +00:00
|
|
|
\usage{
|
2018-05-15 17:07:38 +00:00
|
|
|
add_seasonality(m, name, period, fourier.order, prior.scale = NULL,
|
|
|
|
|
mode = NULL)
|
2017-07-05 08:20:22 +00:00
|
|
|
}
|
|
|
|
|
\arguments{
|
|
|
|
|
\item{m}{Prophet object.}
|
|
|
|
|
|
|
|
|
|
\item{name}{String name of the seasonality component.}
|
|
|
|
|
|
|
|
|
|
\item{period}{Float number of days in one period.}
|
|
|
|
|
|
|
|
|
|
\item{fourier.order}{Int number of Fourier components to use.}
|
2017-09-01 17:04:20 +00:00
|
|
|
|
2018-05-15 17:07:38 +00:00
|
|
|
\item{prior.scale}{Optional float prior scale for this component.}
|
|
|
|
|
|
|
|
|
|
\item{mode}{Optional 'additive' or 'multiplicative'.}
|
2017-07-05 08:20:22 +00:00
|
|
|
}
|
|
|
|
|
\value{
|
|
|
|
|
The prophet model with the seasonality added.
|
|
|
|
|
}
|
|
|
|
|
\description{
|
|
|
|
|
Increasing the number of Fourier components allows the seasonality to change
|
2017-08-26 21:31:33 +00:00
|
|
|
more quickly (at risk of overfitting). Default values for yearly and weekly
|
|
|
|
|
seasonalities are 10 and 3 respectively.
|
2017-07-05 08:20:22 +00:00
|
|
|
}
|
2017-09-01 17:04:20 +00:00
|
|
|
\details{
|
|
|
|
|
Increasing prior scale will allow this seasonality component more
|
|
|
|
|
flexibility, decreasing will dampen it. If not provided, will use the
|
|
|
|
|
seasonality.prior.scale provided on Prophet initialization (defaults to 10).
|
2018-05-15 17:07:38 +00:00
|
|
|
|
|
|
|
|
Mode can be specified as either 'additive' or 'multiplicative'. If not
|
|
|
|
|
specified, m$seasonality.mode will be used (defaults to 'additive').
|
|
|
|
|
Additive means the seasonality will be added to the trend, multiplicative
|
|
|
|
|
means it will multiply the trend.
|
2017-09-01 17:04:20 +00:00
|
|
|
}
|