View source: R/SOptim_PerformanceEval.R
aucSingleClass | R Documentation |
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).
aucSingleClass(obs, pred)
obs |
Integer vector with observed values (class labels, tipically 0 or 1). |
pred |
Numeric vector with predicted probabilities. |
Uses the ROCR package for calculations.
Numeric. The AUC value calculated.
prediction
, performance
obs<-sample(c(0,1),100,replace = TRUE)
pred<-runif(100,0,1)
aucSingleClass(obs,pred)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.