Description Usage Arguments Value Author(s) See Also Examples
produces a plot of the ROC-SVM lambda
path.
1 2 |
x |
The rocsvm path object |
... |
Generic compatibility |
The entire solution path of ROC-SVM solution as a function of lambda
.
Seung Jun Shin, Do Hyun Kim
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | # The 'obj' comes from an example description of rocsvm.path()
library(rocsvm.path)
n <- 30
p <- 2
delta <- 1
set.seed(309)
y <- c(rep(1, n/2), rep(-1, n/2))
x <- matrix(0, n, p)
for (i in 1:n){
if (y[i] == 1) {
x[i,] <- rnorm(p, -delta, 1)
} else {
x[i,] <- rnorm(p, delta, 1)
}
}
rho = 1
kernel = radial.kernel
param.kernel = 1/ncol(x)
prop = 0.1
obj <- rocsvm.path(x, y, rho, kernel, param.kernel, prop)
plot(obj)
# or plot.rocsvm(obj, lty = 2, lwd = 2, col = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.