Support Vector Machines

We're going to be utilizing a new classifier in this chapter, a linear Support Vector Machine (SVM). An SVM is an algorithm that attempts to linearly separate data points into classes using a maximum-margin hyperplane. That's a mouthful, so let's look at what it really means.

Suppose we have two classes of data, and we want to separate them with a line. (We'll just deal with two features, or dimensions, here.) What is the most effective way to place that line? Lets have a look at an illustration:

In the preceding diagram, line H1 does not effectively discriminate between the two classes, so we can eliminate that one. ...

Get Python Machine Learning Blueprints - Second Edition 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.