efa {utsf}R Documentation

Estimate the forecast accuracy of a model on a time series

Description

It uses an object of class utsf to asses the forecasting accuracy of its associated model on its associated time series applying a rolling origin evaluation.

Usage

efa(model, h, type = c("normal", "minimum"), size = NULL, prop = NULL)

Arguments

model

An object of class utsf with a model trained with a time series.

h

A positive integer. The forecasting horizon.

type

A string. Possible values are "normal" (the default) and "minimum". See the vignette utsf for an explanation of both ways of evaluating forecast accuracy.

size

An integer. It is the size of the test set (how many of the last observations of the time series are used as test set). It can only be used when the type parameter is "normal". By default, it is the length of the forecasting horizon.

prop

A numeric value in the range (0, 1). It is the proportion of the time series used as test set. It can only be used when the type parameter is "normal".

Value

A list with four components:

per_horizon

A matrix with the estimated forecast accuracy per forecasting horizon using several forecasting accuracy measures.

global

The average estimated forecast accuracy for all the horizons. It is computed as the mean of the different rows of the per_horizon component.

test_sets

A matrix with the test sets used in the evaluation. Each row of the matrix is a test set.

predictions

The predictions for the test sets.

Examples

m <- create_model(UKgas, lags = 1:4, method = "rt")
efa(m, h = 4, type = "normal", size = 8)

[Package utsf version 1.3.0 Index]