plotROC: Plotting a ROC curve

Description Usage Arguments Value Examples

View source: R/AStrap.R

Description

Plotting a ROC curve based on ggplots.

Usage

1
plotROC(probalility, labels)

Arguments

labels

A vector, matrix, list, or data frame containing the true class labels. Must have the same dimensions as 'predictions

probality

A vector, matrix, list, or data frame containing the predictions

Value

A ROC curve.

Examples

1
2
3
4
5
6
7
##Loading example data
load(system.file("data","example_svm.Rdata",package = "AStrap"))
proba <- as.data.frame(attr(example_svm$svmPre, "probabilities"))
testset <- example_svm$testSet
label <- testset$class
library(ggplot2)
plotROC(proba,label)

BMILAB/AStrap documentation built on Nov. 20, 2020, 4:03 p.m.