rocsvm.path {rocsvm.path} | R Documentation |
Fit the entire regularization path for ROC-Support Vector Machine (ROC-SVM)
Description
This algorithm computes the entire regularization path for the ROC-Support Vector Machine with a relatively low cost compared to quadratic programming problem.
Usage
rocsvm.path(x, y, rho = 1, kernel = poly.kernel, param.kernel = 1,
prop = 0.5, lambda.min = 1e-05, eps = 1e-05, Nmoves = 500)
Arguments
x |
The data matrix (n x p) with n rows (observations) on p variables (columns) |
y |
The |
rho |
A positive constant |
kernel |
This is a user-defined function. Provided options are polynomial kernel; |
param.kernel |
The parameter(s) for the kernel. For this radial kernel, the parameter is known in the fields as "gamma". For the polynomial kernel, it is the "degree" |
prop |
The proportion of large class corresponding a point of small class by speed-up tricks (the default is |
lambda.min |
The smallest value of lambda for termination of the algorithm (the default is |
eps |
An adjustment computing errors |
Nmoves |
The maximum number of iterations the rocsvm.path algorithm |
Value
A 'rocsvm.path' object is returned, for which there are lambda
values and corresponding values of alpha
for each data point.
Author(s)
Seung Jun Shin, Do Hyun Kim
See Also
rocsvm.get.solution
, plot.rocsvm
, rocsvm.intercept
Examples
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)