err_percent_above: Computes the accepted error in percentage needed to get a...

View source: R/error.R

err_percent_aboveR Documentation

Computes the accepted error in percentage needed to get a percentage of acceptable estimates close to a target value

Description

Computes the accepted error in percentage needed to get a percentage of acceptable estimates close to a target value

Usage

err_percent_above(
  actual = NULL,
  predicted = NULL,
  target = 80,
  metric = "mape",
  errs = ind_error(actual, predicted, metric),
  window = list(below = 0, above = 100)
)

Arguments

actual

A numeric vector of true values

predicted

A numeric vector of estimated values

target

A numeric: desired percent of "acceptable" estimated values

metric

A character naming how to compute the error

errs

A vector of numeric being the individual errors

window

A list of integers: window where the objective lies

Value

The numeric percentage of prediction errors below the cutoff

Examples

err_percent_above(actual = c(35, 36), predicted = c(36, 34), target = 80,
                  metric = "mape")

cottinlola/modeleVariablesAP documentation built on April 30, 2022, 7:42 a.m.