dx_nir: Calculate No Information Rate (NIR)

dx_nirR Documentation

Calculate No Information Rate (NIR)

Description

The No Information Rate is the proportion of the largest class in the actual outcomes. It represents the accuracy that a naive model would achieve by always predicting the most frequent class. It's a baseline measure for classification performance.

Usage

dx_nir(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.

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.

Examples

cm <- dx_cm(dx_heart_failure$predicted, dx_heart_failure$truth, threshold = 0.5, poslabel = 1)
nir <- dx_nir(cm)
print(nir)

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