e1071 package can help you to easily apply the very powerful Support Vector Machine (SVM) classification technique.
If you have not already installed the
caret packages, install them now. Download the data files for this chapter from the book's website and place the
banknote-authentication.csv file in your R working directory. We will build an SVM model to predict
class based on the other variables.
To classify using SVM, follow these steps:
> library(e1071) > library(caret)
> bn <- read.csv("banknote-authentication.csv")
> bn$class <- factor(bn$class)
> set.seed(1000) ...