ksvm-class {kernlab} | R Documentation |
An S4 class containing the output (model) of the
ksvm
Support Vector Machines function
Objects can be created by calls of the form new("ksvm", ...)
or by calls to the ksvm
function.
type
:"character"
containing
the support vector machine type
("C-svc", "nu-svc", "C-bsvc", "spoc-svc",
"one-svc", "eps-svr", "nu-svr", "eps-bsvr")param
:"list"
containing the
Support Vector Machine parameters (C, nu, epsilon)kernelf
:"function"
containing
the kernel functionkpar
:"list"
containing the
kernel function parameters (hyperparameters)kcall
:"ANY"
containing the ksvm
function callscaling
:"ANY"
containing the
scaling information performed on the dataterms
:"ANY"
containing the
terms representation of the symbolic model used (when using a formula)xmatrix
:"input"
("list"
for multiclass problems
or "matrix"
for binary classification and regression
problems) containing the support vectors caclulated from
the data matrix used during computations (possibly scaled and
whithout NA). In the case of multi-class classification each list
entry contains the support vectors from each binary classification
problem from the one-against-one method.ymatrix
:"output"
the response "matrix"
or "factor"
or "vector"
or
"logical"
fitted
:"output"
with the fitted values,
predictions using the training set.lev
:"vector"
with the levels of the
response (in the case of classifiaction)prob.model
:"list"
with the
class prob. modelprior
:"list"
with the
prior of the training setnclass
:"numeric"
containing
the number of classes (in the case of classification)alpha
:"listI"
containing the
resulting alpha vector ("list"
or "matrix"
in case of multiclass classification) (support vectors)coef
:"ANY"
containing the
resulting coefficientsalphaindex
:"list"
containingb
:"numeric"
containing the
resulting offset SVindex
:"vector"
containing
the indexes of the support vectorsnSV
:"numeric"
containing the
number of suppport vectors obj
:vector
containg the value of the objective function. When using
one-against-one in multiclass classification this is a vector.error
:"numeric"
containing the
training errorcross
:"numeric"
containing the
cross-validation error n.action
:"ANY"
containing the
action performed for NA signature(object = "ksvm")
: return the indexes
of support vectorssignature(object = "ksvm")
: returns the complete
5 alpha vector (wit zero values)signature(object = "ksvm")
: returns the
indexes of non-zero alphas (support vectors)signature(object = "ksvm")
: returns the
cross-validation error signature(object = "ksvm")
: returns the training
error signature(object = "ksvm")
: returns the value of the objective functionsignature(object = "vm")
: returns the fitted
values (predict on training set) signature(object = "ksvm")
: returns the kernel
functionsignature(object = "ksvm")
: returns the kernel
parameters (hyperparameters)signature(object = "ksvm")
: returns the levels in
case of classification signature(object="ksvm")
: returns class
prob. model valuessignature(object="ksvm")
: returns
the parameters of the SVM in a list (C, epsilon, nu etc.)signature(object="ksvm")
: returns
the prior of the training setsignature(object="ksvm")
: returns the
ksvm
function callsignature(object = "ksvm")
: returns the
scaling values signature(object = "ksvm")
: prints the object informationsignature(object = "ksvm")
: returns the problem typesignature(object = "ksvm")
: returns the data
matrix usedsignature(object = "ksvm")
: returns the
response vector
Alexandros Karatzoglou
alexandros.karatzolgou@ci.tuwien.ac.at
ksvm
,
rvm-class
,
gausspr-class
## simple example using the promotergene data set data(promotergene) ## train a support vector machine gene <- ksvm(Class~.,data=promotergene,kernel="rbfdot",kpar=list(sigma=0.015),C=50,cross=4) gene # the kernel function kernelf(gene) # the alpha values alpha(gene) # the coefficients coef(gene) # the fitted values fitted(gene) # the cross validation error cross(gene)