Chapter 4
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 1 of Book 4. 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.
Get R All-in-One For Dummies now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.