fnr: Calculate False Negative Rate (FNR)

fnrR Documentation

Calculate False Negative Rate (FNR)

Description

Calculates the False Negative Rate (FNR), which is the proportion of actual positives that were incorrectly identified as negatives by the classifier. FNR is also known as the miss rate and is a critical measure in evaluating the performance of a classifier, especially in scenarios where failing to detect positives is costly.

Usage

dx_fnr(cm, detail = "full", ...)

dx_miss_rate(cm, detail = "full", ...)

Arguments

cm

A dx_cm object created by dx_cm().

detail

Character specifying the level of detail in the output: "simple" for raw estimate, "full" for detailed estimate including 95% confidence intervals.

...

Additional arguments to pass to metric_binomial function, such as citype for type of confidence interval method.

Details

FNR is an important measure in situations where the cost of missing a positive classification is high. It complements the True Positive Rate (sensitivity) and helps in understanding the trade-offs between identifying positives and avoiding false alarms. A lower FNR is generally desirable and indicates a more sensitive classifier.

The formula for FNR is:

FNR = \frac{False Negatives}{False Negatives + True Positives}

Value

Depending on the detail parameter, returns a numeric value representing the calculated metric or a data frame/tibble with detailed diagnostics including confidence intervals and possibly other metrics relevant to understanding the metric.

See Also

dx_cm() to understand how to create and interact with a 'dx_cm' object.

Examples

cm <- dx_cm(dx_heart_failure$predicted, dx_heart_failure$truth,
  threshold =
    0.5, poslabel = 1
)
simple_fnr <- dx_fnr(cm, detail = "simple")
detailed_fnr <- dx_fnr(cm)
print(simple_fnr)
print(detailed_fnr)

overdodactyl/diagnosticSummary documentation built on Jan. 28, 2024, 10:07 a.m.