svrpath: Fit the entire regularization path for Support Vector Regression
Description
This algorithm computes the entire regularization path for the support vector regression with a relatively low cost compared to quadratic programming problem.
The data matrix (n x p) with n rows (observations) on p variables (columns)
y
The real number valued response variable
svr.eps
An epsilon in epsilon-insensitive loss function
kernel.function
This is a user-defined function. Provided are poly.kernel (the default, with parameter set to default to a linear kernel) and radial.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"
ridge
Sometimes the algorithm encounters singularities; in this case a small value of ridge can help, default is ridge = 1e-8
eps
A small machine number which is used to identify minimal step sizes
lambda.min
The smallest value of lambda for termination of the algorithm. Default is lambda = 1e-8
...
Generic compatibility
Value
A 'svrpath' object is returned, for which there are lambda values and corresponding values of theta for each data point.
# NOT RUN {set.seed(1)
n <- 30
p <- 50
x <- matrix(rnorm(n*p), n, p)
e <- rnorm(n, 0, 1)
beta <- c(1, 1, rep(0, p-2))
y <- x %*% beta + e
svr.eps <- 1
obj <- svrpath(x, y, svr.eps = svr.eps)
# }