forecast.tft_result: Generate forecasts for TFT models

View source: R/predict.R

forecast.tft_resultR Documentation

Generate forecasts for TFT models

Description

forecast can only be used if the model object doesn't include known predictors that must exist in the data. It's fine if a recipe passed to tft_dataset_spec() computes known predictors though.

Usage

## S3 method for class 'tft_result'
forecast(object, horizon = NULL, past_data = NULL)

Arguments

object

The tft_result object that will be used to create predictions.

horizon

Number of time steps ahead to generate predictions.

past_data

If NULL then the data the model was trained on is used. Predictions are made for the period right after past_data.


mlverse/tft documentation built on June 19, 2022, 4:31 a.m.