Chapter 9
Support Your Local Vector
IN THIS CHAPTER
Working with a support vector machine (SVM)
Using SVMs in R
An SVM for congressional voting
Classification is an important part of machine learning (ML). One important classifying technique is the support vector machine (SVM). So, what exactly is an SVM and how does it work?
Some Data to Work With
To introduce the SVM, I use the iris data set, which I first discuss in Chapter 6. It provides four measurements on each of 150 irises, with 50 flowers in each of three species.
This data set is useful for examples whose objective is to use the measurements (petal width and length, sepal width and length) as a means of identifying a flower's species. Though one species (setosa) is distinct from the other two (versicolor and virginica), those other two aren’t completely distinct from one another.
Using a subset
To make ...
In preceding chapters, I tell you how to work with