skill_score {fabletools} | R Documentation |
Forecast skill score measure
Description
This function converts other error metrics such as MSE
into a skill score.
The reference or benchmark forecasting method is the Naive method for
non-seasonal data, and the seasonal naive method for seasonal data.
When used within accuracy.fbl_ts
, it is important that the data
contains both the training and test data, as the training data is used to
compute the benchmark forecasts.
Usage
skill_score(measure)
Arguments
measure |
The accuracy measure to use in computing the skill score. |
Examples
skill_score(MSE)
library(fable)
library(tsibble)
lung_deaths <- as_tsibble(cbind(mdeaths, fdeaths))
lung_deaths %>%
dplyr::filter(index < yearmonth("1979 Jan")) %>%
model(
ets = ETS(value ~ error("M") + trend("A") + season("A")),
lm = TSLM(value ~ trend() + season())
) %>%
forecast(h = "1 year") %>%
accuracy(lung_deaths, measures = list(skill = skill_score(MSE)))
[Package fabletools version 0.4.2 Index]