## 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)
Run the code above in your browser using DataLab