Specify a Naive2 benchmark model for use with
fabletools::model().
Value
A model definition that can be used inside fabletools::model().
Details
NAIVE2() implements the Naive2 benchmark from the M4 forecasting
competition. The method tests the response for seasonality at the specified
frequency.
If seasonality is detected, the response is adjusted using classical multiplicative decomposition. Naive forecasts are produced from the seasonally adjusted response and subsequently reseasonalized.
If seasonality is not detected, the method is equivalent to an ordinary naive forecast.
The season() special controls the seasonal frequency. When
period = NULL, the frequency is inferred from the tsibble index.
Alternatively, it can be specified explicitly, such as
season(12) for monthly data.
See also
Other NAIVE2:
fitted.NAIVE2(),
forecast.NAIVE2(),
model_sum.NAIVE2(),
residuals.NAIVE2()
Examples
library(dplyr)
library(tsibble)
library(fabletools)
train_frame <- M4_monthly_data |>
filter(series == first(series)) |>
as_tsibble(index = index)
model_frame <- train_frame |>
model("NAIVE2" = NAIVE2(value ~ season(12)))
model_frame
#> # A mable: 1 x 1
#> NAIVE2
#> <model>
#> 1 <NAIVE2>
