loss_function: Calculate error via loss functions

Description Usage Arguments Value

View source: R/forecast_metrics.R

Description

A function to calculate various error loss functions. Options include: MSE, RMSE, MAE, and MAPE. The default is MSE loss.

Usage

1
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


tylerJPike/OOS documentation built on March 20, 2021, 3:20 a.m.