liquidSVM (version 1.2.2)

plotROC: Plots the ROC curve for a result or model

Description

This can be used either using rocSVM or lsSVM

Usage

plotROC(x, correct, posValue = NULL, xlim = 0:1, ylim = 0:1, asp = 1,
  type = NULL, pch = "x", add = FALSE, ...)

Arguments

x

either the result from a test or a model

correct

either the true values or testing data for the model

posValue

the label marking the positive value. If NULL (default) then the larger value.

xlim

sets better defaults for plot.default

ylim

sets better defaults for plot.default

asp

sets better defaults for plot.default

type

sets better defaults for plot.default

pch

sets better defaults for plot.default

add

if `FALSE` (default) produces a new plot and if `TRUE` adds to existing plot.

...

gets passed to plot.default

See Also

rocSVM, lsSVM

rocSVM

Examples

Run this code
# NOT RUN {
banana <- liquidData('banana-bc')
model <- rocSVM(Y~.,banana$train)

plotROC(model ,banana$test)
# or:
result <- test(model, banana$test)
plotROC(result, banana$test$Y)

model.ls <- lsSVM(Y~., banana$train)
result <- plotROC(model.ls, banana$test)
# }

Run the code above in your browser using DataCamp Workspace