# NOT RUN {
## use the spam data
data(spam)
dt <- as.matrix(spam[c(10:20,3000:3010),-58])
## initialize kernel function
rbf <- rbfdot(sigma = 0.05)
rbf
## calculate kernel matrix
kernelMatrix(rbf, dt)
yt <- as.matrix(as.integer(spam[c(10:20,3000:3010),58]))
yt[yt==2] <- -1
## calculate the quadratic kernel expression
kernelPol(rbf, dt, ,yt)
## calculate the kernel expansion
kernelMult(rbf, dt, ,yt)
# }
Run the code above in your browser using DataLab