mrf_forecast {mrf} | R Documentation |
Multiresolution Forecast
Description
Creates a multiresolution forecast for a given multiresolution model based on [Stier et al., 2021] which is currently in press. (mrf_train).
Usage
mrf_forecast(Model, Horizon=1)
Arguments
Model |
List containing model specifications from mrf_train(). |
Horizon |
Number indicating horizon for forecast from 1 to horizon. |
Value
List of
Forecast |
[1:Horizon] Numerical vector with forecast of horizon according to its index. |
Model |
List containing model specifications from mrf_train(). |
Author(s)
Quirin Stier
References
[Stier et al., 2021] Stier, Q.,Gehlert, T. and Thrun, M. C.: Multiresolution Forecasting for Industrial Applications, Processess, 2021.
Examples
data(AirPassengers)
Data = as.vector(AirPassengers)
len_data = length(Data)
Train = Data[1:(len_data-2)]
Test = Data[(len_data-1):len_data]
# One-step forecast (Multiresolution Forecast)
model = mrf_train(Train)
one_step = mrf_forecast(model, Horizon=1)
Error = one_step$Forecast - Test[1]
# Multi-step forecast (Multiresolution Forecast)
# Horizon = 2 => Forecast with Horizon 1 and 2 as vector
model = mrf_train(Train, Horizon=2)
multi_step = mrf_forecast(model, Horizon=2)
Error = multi_step$Forecast - Test
[Package mrf version 0.1.6 Index]