informedness: Calculate Informedness

informednessR Documentation

Calculate Informedness

Description

Calculates Informedness for the provided confusion matrix. Informedness is a combined measure of Sensitivity (True Positive Rate) and Specificity (True Negative Rate). It reflects the probability that a classifier is informed about the true class, ranging from -1 to 1.

Usage

dx_informedness(cm, detail = "full", boot = FALSE, bootreps = 1000)

dx_youden_j(cm, detail = "full", boot = FALSE, bootreps = 1000)

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.

boot

Logical specifying if confidence intervals should be generated via bootstrapping. Note, this can be slow.

bootreps

The number of bootstrap replications for calculating confidence intervals.

Details

Informedness is defined as Informedness = Sensitivity + Specificity - 1. It is the sum of the true positive rate and the true negative rate minus one. It's a useful measure when you want to consider both the sensitivity and specificity of a test. A higher informedness indicates better overall performance of the classifier in distinguishing between the classes.

The formula for Informedness is:

Informedness = Sensitivity + Specificity - 1

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.

dx_sensitivity(), dx_specificity() for components of informedness.

Examples

cm <- dx_cm(dx_heart_failure$predicted, dx_heart_failure$truth, threshold = 0.5, poslabel = 1)
simple_informedness <- dx_informedness(cm, detail = "simple")
detailed_informedness <- dx_informedness(cm)
print(simple_informedness)
print(detailed_informedness)

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