get_auc: Compute AUC for predictions from a model

View source: R/get_auc.xplus.R

get_aucR Documentation

Compute AUC for predictions from a model

Description

Compute AUC for predictions from a model

Usage

get_auc(object, newx = NULL, newy = NULL, weights = NULL, ...)

## S3 method for class 'xplus'
get_auc(object, newx = NULL, newy = NULL, weights = NULL, ...)

Arguments

object

A model object.

newx

Feature matrix.

newy

True labels.

weights

Optional sample weights.

...

Arguments passed to predict.xplus(), such as s selecting a single lambda.

Value

Numeric AUC value.

See Also

assess(), auc()

Examples

set.seed(1)
x <- matrix(rnorm(100 * 5), ncol = 5)
y <- c(rep(1, 20), rep(0, 80))
fit <- xplus(x, y, max_iter = 5)
get_auc(fit, newx = x, newy = y)

xplus documentation built on Sept. 26, 2026, 5:07 p.m.