O'Reilly logo

R Projects For Dummies by Joseph Schmuller

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9

Support Your Local Vector

IN THIS CHAPTER

check Working with a support vector machine (SVM)

check Using SVMs in R

check 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.

tip In preceding chapters, I tell you how to work with iris.uci, a data set downloaded from the UCI ML repository and subsequently cleaned up. In this chapter, I describe how to work with the iris data set that comes with R.

Using a subset

To make ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required