# NOT RUN {
library(kernlab)
data(benchmark.data)
example.data=benchmark.data[[1]]
#Dividing the samples into a train set and test set.
training.samples=sample(1:dim(example.data)[1],floor(0.7*dim(example.data)[1]),replace=FALSE)
#Specifying the type and hyperparameters for each kernel.
kernels=c('linear',rep('radial',3))
degree=rep(0,4)
scale=rep(0,4)
sigma=c(0,2^seq(-3:0))
kernels.gen(example.data[,1:2], training.samples, kernels, degree, scale, sigma)
# }
Run the code above in your browser using DataLab