# NOT RUN {
library(kernlab)
data(benchmark.data)
example.data=benchmark.data[[1]]
#Create split between training samples and test samples
training.samples=sample(1:dim(example.data)[1],floor(0.7*dim(example.data)[1]),replace=FALSE)
xtrain=example.data[training.samples,1:2]
xtest=example.data[-training.samples,1:2]
#Generate linear kernel
grammpred(xtrain,xtest,'linear',0,0,0)
#Generate radial kernels with different values for the hyperparameter.
grammpred(xtrain,xtest,'radial',2^seq(-3:0),0,0)
# }
Run the code above in your browser using DataLab