aucSingleClass: Calculate the Area Under the ROC Curve (AUC)

View source: R/SOptim_PerformanceEval.R

aucSingleClassR Documentation

Calculate the Area Under the ROC Curve (AUC)

Description

A function used to calculate the Area Under the (Receiver Operating Characteristic) Curve (AUC) when the predicted output is given in probability. This function applies only to single-class problems (e.g., presence/absence of a vegetation type, species).

Usage

aucSingleClass(obs, pred)

Arguments

obs

Integer vector with observed values (class labels, tipically 0 or 1).

pred

Numeric vector with predicted probabilities.

Details

Uses the ROCR package for calculations.

Value

Numeric. The AUC value calculated.

See Also

prediction, performance

Examples

obs<-sample(c(0,1),100,replace = TRUE)
pred<-runif(100,0,1)
aucSingleClass(obs,pred)


joaofgoncalves/SegOptim documentation built on Feb. 5, 2024, 11:10 p.m.