Skip to contents

Internal function to compute the AUC of binomial models within preference_order(). Used within f_binomial_glm(), f_binomial_gam(), and f_binomial_rf(). This function is build for speed and it does not check the inputs.

Usage

score_auc(o = NULL, p = NULL, ...)

Arguments

o

(required, numeric vector) Binomial observations (values 0 and 1). Default: NULL

p

(required, numeric vector) Prediction of binomial model in the range 0-1. Default: NULL

...

(optional) Internal args (e.g. function_name for validate_arg_function_name, a precomputed correlation matrix m, or cross-validation args for preference_order).

Value

numeric: Area Under the ROC Curve

See also

Examples

  score_auc(
    o = c(1, 1, 1, 1, 0, 0, 0),
    p = c(1, 0.8, 0.7, 0.6, 0.5, 0.6, 0.7)
  )
#> [1] 0.8333333