plot_PPPvsTPR: Plot of the probability of positive prediction versus the...

Description Usage Arguments Details Value Examples

View source: R/plot_PPPvsTPR.R

Description

Assumption that the true positive rate can be estimated well from the positive data, it is reasonable to assume that for a given true positive rate a model which leads to a lower probability of positive predictions is more accurate. This is because it will lead to lower fals positive predictions.

Usage

1
2
plot_PPPvsTPR(x, identifyPoints = FALSE, add = FALSE,
  highlightBest = TRUE, xlim = c(0, 1), ylim = c(0, 1), ...)

Arguments

x

a trainOcc object

identifyPoints

logical with default FALSE. set to TRUE and click close to the points in the plot if you want to find out the model rows

add

logical, add the plot to another plot

highlightBest

logical with default set to TRUE which highlights the model ranked highest by the selection criteria, i.e. the one in x$metric

xlim

x axis limits

ylim

y axis limits

...

other parameters passed to plot (if add is FALSE) or points (if add is TRUE)

Details

plot_PPPvsTPR

Value

a scatterplot. the point corresponding to the final model in x is highlighted.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
data(bananas)
### get some models: 
# one-class svm
ocsvm <- trainOcc (x = bananas$tr[, -1], y = bananas$tr[, 1], method="ocsvm", 
                   tuneGrid=expand.grid(sigma=c(seq(0.01, .09, .02), seq(0.1, .9, .1)), 
                                        nu=seq(.05,.55,.1)) )
# biased svm
biasedsvm <- trainOcc (x = bananas$tr[, -1], y = bananas$tr[, 1], method="bsvm", 
                       tuneGrid=expand.grid(sigma=c(0.1, 1), 
                                            cNeg=2^seq(-4, 2, 2), 
                                            cMultiplier=2^seq(4, 8, 2) ) )
# compare with PPPvsTPR-plot
plot_PPPvsTPR(ocsvm)
plot_PPPvsTPR(biasedsvm, add=TRUE, col="red")

## End(Not run)

benmack/oneClass documentation built on Dec. 15, 2020, 7:38 p.m.