ranger_2_scalar_forecast: Obtain scalar forecast from random forest (ranger) model

Description Usage Arguments Details Value Examples

View source: R/modelling.R

Description

Obtain scalar forecast from random forest (ranger) model

Usage

1
ranger_2_scalar_forecast(model, h = 1, target = "value", model_sample)

Arguments

model

estimated ranger model

h

forecasting horizon

target

name of the target variable

model_sample

non-augmented data set for model estimation

Details

Obtain scalar forecast from random forest (ranger) model. The function automatically augments data with lags, fourier terms, trend etc.

Value

scalar forecast for given h

Examples

1
2
3
4
test_ts = stats::ts(rnorm(100), start = c(2000, 1), freq = 12)
test_tsibble = tsibble::as_tsibble(test_ts)
model = ranger_fun(test_tsibble, h = 1)
ranger_2_scalar_forecast(model, h = 1, model_sample = test_tsibble)

kassandra-ru/kassandr documentation built on Jan. 1, 2022, 7:39 a.m.