Skip to contents

Calculate the optimal probability classification threshold using the index of union method (IU).

Usage

calc_iu(estimates, truth)

Arguments

estimates

A vector of classification probabilities. Values should represent the probability of 1 in the truth argument.

truth

An integer vector of 0 and 1 representing the true classifications.

Value

A numeric scalar representing the optimal probability threshold.

Details

The index of union method (Unal, 2017) defines the optimal cut point as the point that minimizes the summed absolute differences between the area under the curve (AUC) and the sensitivity and specificity.

The optimality criterion is defined as:

$$\text{min}(|sensitivity - AUC| + |specificity - AUC|)$$

References

Unal, I. (2017). Defining an optimal cut-point value in ROC analysis: An alternative approach. Computational and Mathematical Methods in Medicine, Article 3762651. doi:10.1155/2017/3762651

See also

Other optimal threshold methods: calc_cz(), calc_gmean(), calc_minp(), calc_topleft(), calc_youden()

Examples

calc_iu(
  estimates = dcm_probs$att1$estimate,
  truth = dcm_probs$att1$truth
)
#> [1] 0.3170266

calc_iu(
  estimates = dcm_probs$att2$estimate,
  truth = dcm_probs$att2$truth
)
#> [1] 0.6789389

calc_iu(
  estimates = dcm_probs$att3$estimate,
  truth = dcm_probs$att3$truth
)
#> [1] 0.3722605