tf_calc_metrics: Calculates different metrics for multiple models.

Description Usage Arguments Details Value

Description

This function calculates different metrics for all contained forecasts in a dataframe. The different models have to be seperated with the help of the key column.

Usage

1
2
tf_calc_metrics(forecasts, testset, metrics = c("rmse", "mae", "rsq",
  "mase", "mape"), detailed = FALSE)

Arguments

forecasts

The dataframe containing the forecasts.

testset

The dataframe containing the testset.

metrics

A list with the returned metrics. Following metrics are possible:

RMSE

Calculates the Root Mean Squared Error

MAE

Calculates the Mean Absolute Error

RSQ

Calculates the R Squared

MASE

Calculates the Mean Absolute Scaled Error

MAPE

Calculates the Mean Absolute Percent Error

detailed

If True the metrics for each article will be returned.

Details

The metrics are calculated with the help of the yardstick package (https://github.com/tidymodels/yardstick).

Value

The calculated metrics for each method.


flostracke/efor documentation built on June 5, 2019, 5:36 p.m.