score_auc: Compute area under the ROC curve between binomial...

View source: R/score_auc.R

score_aucR Documentation

Compute area under the ROC curve between binomial observations and probabilistic predictions

Description

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

Other modelling_tools: case_weights(), model_formula(), score_cramer(), score_r2()

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)
  )


collinear documentation built on Dec. 8, 2025, 5:06 p.m.