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 problem support vector machine problem 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 datakterms
:"ANY"
containing the
terms representation of the symbolic model used (when using a formula)xmatrix
:"matrix"
the data
matrix used during computations (possibly scaled and whithout NA)ymatrix
:"ANY"
the response matrix/vector fit
:"ANY"
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
:"ANY"
containing the
resulting alpha vector (list or matrix in case of multiclass classification) (support vectors)coeff
:"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 vector machines 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
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 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 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 coeff(gene) # the fitted values fit(gene) # the cross validation error cross(gene)