Description Usage Arguments Details Value See Also Examples
View source: R/linearizedSVR.R
Train a prototype-based Linearized Support-Vector Regression model
1 2 3 4 |
X |
matrix of examples, one example per row. |
Y |
vector of target values. Must be the same length as the number of rows in |
C |
cost of constraints violation |
epsilon |
tolerance of termination criterion for optimization |
nump |
number of prototypes by which to represent each example in |
ktype |
kernel-generating function, typically from the kernlab package |
kpar |
a list of any parameters necessary for |
prototypes |
the method by which prototypes will be chosen |
clusterY |
whether to cluster |
epsilon.up |
allows you to use a different setting for
|
epsilon.down |
allows you to use a different setting for
|
expectile |
if non-null, do expectile regression using the
given expectile value. Currently uses the |
scale |
a boolean value indicating whether |
sigest |
if the kernel expects a |
This function trains a new LinearizedSVR model based on X
and Y
. See LinearizedSVR-package for an explanation
of how such models are defined.
a model object that can later be used as the first
argument for the predict()
method.
LinearizedSVR-package
1 2 3 4 5 | dat <- rbind(data.frame(y=2, x1=rnorm(500, 1), x2=rnorm(500, 1)),
data.frame(y=1, x1=rnorm(500,-1), x2=rnorm(500,-1)))
mod <- LinearizedSVRTrain(X=as.matrix(dat[-1]), Y=dat$y, nump=6)
res <- predict(mod, newdata=as.matrix(dat[-1]))
plot(x2 ~ x1, dat, col=c("red","green")[1+(res>1.5)], pch=c(3,20)[dat$y])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.