loss_function {OOS} | R Documentation |
Calculate error via loss functions
Description
A function to calculate various error loss functions. Options include: MSE, RMSE, MAE, and MAPE. The default is MSE loss.
Usage
loss_function(forecast, observed, metric = "MSE")
Arguments
forecast |
numeric: vector of forecasted values |
observed |
numeric: vector of observed values |
metric |
string: loss function |
Value
numeric test result
[Package OOS version 1.0.0 Index]