powered by
The AUC values are computed by approximation using the area of the polygons formed under the ROC curve.
auc(pred, labels, nc = 200L, nine_na = TRUE)# S3 method for aphylo_auc print(x, ...)# S3 method for aphylo_auc plot(x, y = NULL, ...)
# S3 method for aphylo_auc print(x, ...)
# S3 method for aphylo_auc plot(x, y = NULL, ...)
A list:
tpr A vector of length nc with the True Positive Rates.
tpr
nc
tnr A vector of length nc with the True Negative Rates.
tnr
fpr A vector of length nc with the False Positive Rates.
fpr
fnr A vector of length nc with the False Negative Rates.
fnr
auc A numeric value. Area Under the Curve.
auc
cutoffs A vector of length nc with the cutoffs used.
cutoffs
A numeric vector with the predictions of the model. Values must range between 0 and 1.
An integer vector with the labels (truth). Values should be either 0 or 1.
Integer. Number of cutoffs to use for computing the rates and AUC.
Logical. When TRUE, 9 is treated as NA.
TRUE
NA
An object of class aphylo_auc.
aphylo_auc
Further arguments passed to the method.
Ignored.
set.seed(8381) x <- rdrop_annotations(raphylo(50), .3) ans <- aphylo_mcmc(x ~ mu_d + mu_s + Pi) ans_auc <- auc(predict(ans, loo = TRUE), x[,1,drop=TRUE]) print(ans_auc) plot(ans_auc)
Run the code above in your browser using DataLab