regMetrics: Calculate regression metrics

Description Usage Arguments Value

View source: R/calc_metrics.R

Description

Calculate MAE, RMSE and utility-based regression evaluation metrics

Usage

1
2
3
regMetrics(trues, preds, y_train = NULL, norm = FALSE,
  aeStatFUN = stats::median, seStatFUN = mean, util = FALSE,
  util.parms = NULL)

Arguments

trues

a vector of true values

preds

a vector of predicted values

y_train

a vector of training values

norm

a Boolean indicating whether to calculate normalized regression metrics

aeStatFUN

a function to calculate a summary of y_train for absolute error normalization. Default is median

seStatFUN

a function to calculate a summary of y_train for squared error normalization. Default is mean

util

a Boolean indicating whether to calculate utility-based regression metrics

util.parms

a named list of parameters to use for calculating utility-based regression metrics. Should contain slots

  • phi.parms - the result of function phi.control

  • phi.control - if phi.parms is undefined, then phi.control can be provided with a list of named arguments to feed function phi.control using y_train. Default is list(method = "extremes", extr.type="high")

  • loss.parms - the results of function uba::loss.control

  • p - Default is 0.5

  • thr - Relevance threshold. Default is 1

  • beta - Beta for F-measure. Default is 1

Value

a named vector of calculated metrics


mrfoliveira/Evaluation-procedures-for-forecasting-with-spatio-temporal-data documentation built on April 11, 2021, 10:50 a.m.