Similar to other predict methods, this function predicts fitted values from a "LTSF" object.

# S3 method for LTSF
predict(model, data = NULL, key = NULL, endog = NULL)

Format

S3 methods

Arguments

model

R6Class object
A "LTSF" object for prediction.

data

DataFrame
DataFrame containting the data.

key

character, optional
Name of the ID column.
Defaults to the first column if not provided.

endog

character, optional
The endogenous variable, i.e. time series.
Defaults to the first non-ID column.

Value

Forecasted values, structured as follows:

  • ID - type INTEGER, timestamp.

  • VALUE - type DOUBLE, forecast value.

Examples

Input DataFrame df.predict and predict with a "LTSF" object:


> res <- predict(lt1, data=df.predict)

Output:


> print(res$Collect)

See also