mod_error: Error Metrics for Supervised Learning

View source: R/mod_error.R

mod_errorR Documentation

Error Metrics for Supervised Learning

Description

Calculate error metrics for pair of vector, e.g. true and estimated values from a model

Usage

mod_error(
  true,
  estimated,
  estimated.prob = NULL,
  type = NULL,
  rho = FALSE,
  tau = FALSE,
  na.rm = TRUE,
  verbosity = 0
)

Arguments

true

Vector: True values

estimated

Vector: Estimated values

estimated.prob

Vector: Estimated probabilities for Classification, if available.

type

Character: "Regression", "Classification", or "Survival". If not provided, will be set to Regression if y is numeric.

rho

Logical: If TRUE, calculate Spearman's rho.

tau

Logical: If TRUE, calculate Kendall's tau. This can be slow for long vectors

na.rm

Logical: Passed to mean and range functions.

verbosity

Integer: If > 0, print messages to console.

Details

In regression, NRMSE = RMSE / range(observed)

Value

Object of class mod_error

Author(s)

E.D. Gennatas


egenn/rtemis documentation built on Dec. 17, 2024, 6:16 p.m.