plot.rocsvm: Plot the rocsvm.path, solution paths of ROC-SVM as a function...

Description Usage Arguments Value Author(s) See Also Examples

Description

produces a plot of the ROC-SVM lambda path.

Usage

1
2
## S3 method for class 'rocsvm'
plot(x, ...)

Arguments

x

The rocsvm path object

...

Generic compatibility

Value

The entire solution path of ROC-SVM solution as a function of lambda.

Author(s)

Seung Jun Shin, Do Hyun Kim

See Also

rocsvm.path

Examples

 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)

rocsvm.path documentation built on May 2, 2019, 10:57 a.m.