loss_function.Rd
A function to calculate various error loss functions. Options include: MSE, RMSE, MAE, and MAPE. The default is MSE loss.
loss_function(forecast, observed, metric = "MSE")
forecast | numeric: vector of forecasted values |
---|---|
observed | numeric: vector of observed values |
metric | string: loss function |
numeric test result