Learn R Programming

prophet (version 0.2.1)

add_seasonality: Add a seasonal component with specified period, number of Fourier components, and prior scale.

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.

Usage

add_seasonality(m, name, period, fourier.order, prior.scale = NULL)

Arguments

m

Prophet object.

name

String name of the seasonality component.

period

Float number of days in one period.

fourier.order

Int number of Fourier components to use.

prior.scale

Float prior scale for this component.

Value

The prophet model with the seasonality added.

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).