Skip to contents

Create predictions for TFT models

Usage

# S3 method for tft
predict(object, new_data, type = "numeric", mode = "horizon", step = NULL, ...)

Arguments

object

a model object for which prediction is desired.

new_data

A data.frame() containing a dataset to generate predictions for. In general it's used to pass static and known information to generate forecasts.

type

Currently only 'numeric' is accepted but this might change in the future if we end up supporting classification.

mode

Prediction mode. If 'horizon' predict will generate a single multi-horizon prediction. This is mostly sueful when creating forecasts for the time frame right after the model has been trained. If 'full' then predictions are created for every possible time step (with a possible step) argument. When mode='horizon' (default) only the prediction columns are returned. When mode='full' all columns from new_data are returned as the result might have more lines than in new_data because it's potentially possible to generate different predictions for the same time-step.

step

Step for predictions when using mode='full'.

...

additional arguments affecting the predictions produced.