Learn R Programming

LTAR (version 0.1.0)

err: Forecast error calculations

Description

Determines the Frobenius norm between true tensor and the actual tensor.

Usage

err(true_tensor, forecast_tensor)

Value

Error: The Frobenius norm between the actual and predictor tensor slices at each forecast step.

Arguments

true_tensor

: The true tensor from the test set.

forecast_tensor

: The predicted values from LTARpred()

Author

Kyle Caudle

Randy Hoover

Jackson Cates

Examples

Run this code
require(rTensor)
data(tensor)
tnsr <- as.tensor(tensor)
tensorTest <- tnsr[,1:2,]
tensorTrain <- tnsr[,3:2000,]
forecast <- LTARpred(p=5,tensorTrain,h=2)
predTensor <- forecast$ypred
errors <- err(tensorTest,predTensor)
errors

Run the code above in your browser using DataLab