visualize.roc.curve: Plot Roc curve

Description Usage Arguments Value Examples

View source: R/metrics.R

Description

Plot Roc curve

Usage

1
visualize.roc.curve(roc.FPR, roc.TPR, auc, file = "None")

Arguments

roc.FPR

a numerical vector representing false positive rates

roc.TPR

a numerical vector representing true positive rates

auc

auc value. Use auc() function.

file

name of output file for saving roc curve plot.

Value

Plot roc curve

Examples

1
2
3
4
5
6
7
8
random.x <- sample.int(3000,1000,replace=FALSE)
class <- c(rep(TRUE, 500), rep(FALSE, 500))
pos <- sample.int(1000, 1000)
random.y <- class[order(pos)]
roc.curve <- roc.curve(random.x, random.y)
auc <- auc(roc.curve$FPR , roc.curve$TPR )
visualize.roc.curve(roc.curve$FPR , roc.curve$TPR, auc)
visualize.roc.curve(roc.curve$FPR , roc.curve$TPR, auc, file = "randomRocCurve")

AnderEhu/sme documentation built on Jan. 31, 2022, 12:01 a.m.