File: add_seasonality.Rd

package info (click to toggle)
r-cran-prophet 1.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 736 kB
  • sloc: sh: 13; makefile: 2
file content (54 lines) | stat: -rw-r--r-- 1,701 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/prophet.R
\name{add_seasonality}
\alias{add_seasonality}
\title{Add a seasonal component with specified period, number of Fourier
components, and prior scale.}
\usage{
add_seasonality(
  m,
  name,
  period,
  fourier.order,
  prior.scale = NULL,
  mode = NULL,
  condition.name = NULL
)
}
\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.}

\item{prior.scale}{Optional float prior scale for this component.}

\item{mode}{Optional 'additive' or 'multiplicative'.}

\item{condition.name}{String name of the seasonality condition.}
}
\value{
The prophet model with the seasonality added.
}
\description{
Increasing the number of Fourier components allows the seasonality to change
more quickly (at risk of overfitting). Default values for yearly and weekly
seasonalities are 10 and 3 respectively.
}
\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).

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.

If condition.name is provided, the dataframe passed to `fit` and `predict`
should have a column with the specified condition.name containing booleans
which decides when to apply seasonality.
}