kernlab (version 0.9-0)

ksvm-class: Class "ksvm"

Description

An S4 class containing the output (model) of the ksvm Support Vector Machines function

Arguments

Objects from the Class

Objects can be created by calls of the form new("ksvm", ...) or by calls to the ksvm function.

See Also

ksvm, rvm-class, gausspr-class

Examples

Run this code
## 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)

Run the code above in your browser using DataCamp Workspace