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
 4
 5
 6
 7
 8
 9
10
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

  • rel - the relevance function. Default is "auto" which uses method="range" with utilparms$cf as coefficient

  • thr - Relevance threshold. Default is 1

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

Value

a named vector of calculated metrics


mrfoliveira/STEvaluation-MDPI2021 documentation built on Dec. 21, 2021, 10:07 p.m.