bmrm (version 4.1)

roc.stat: Compute statistics for ROC curve plotting

Description

Compute statistics for ROC curve plotting

Usage

roc.stat(f, y)

Arguments

f

decision value for each instance

y

a logical that specify binary labels

Value

a data.frame() that compute for each threshold value 'f' roc curve statistics: TP, FP, TN, FN, FPR, TPR, sensitivity, specificity, precision, recall, accuracy

Examples

Run this code
# NOT RUN {
  x <- cbind(data.matrix(iris[1:4]))
  w <- nrbmL1(rocLoss(x,iris$Species=="versicolor"),LAMBDA=0.01)
  plot(roc.stat(x %*% w,iris$Species=="versicolor"))
  lines(roc.stat(-x[,2],iris$Species=="versicolor"),col="blue")
# }

Run the code above in your browser using DataLab