Description Usage Arguments Details Value Examples
View source: R/plot_PPPvsTPR.R
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.
1 2 |
x |
a |
identifyPoints |
logical with default |
add |
logical, add the plot to another plot |
highlightBest |
logical with default set to |
xlim |
x axis limits |
ylim |
y axis limits |
... |
other parameters passed to plot (if |
plot_PPPvsTPR
a scatterplot. the point corresponding to the final model in x
is highlighted.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.