liveBook · Manning

Decision boundary

As explained in Machine Learning Algorithms in Depth

A decision boundary is a surface in feature space that separates regions assigned to different predicted classes.

A decision boundary separates feature-space regions assigned to different classes. For a linear binary classifier, predict the sign of θ·x + θ₀, where x is a feature vector, θ is a weight vector, and θ₀ is an offset. The boundary is the set of points satisfying θ·x + θ₀ = 0: a hyperplane with normal vector θ. Points on the θ side receive label +1; points on the opposite side receive −1. section 5.2

Figure 5.2 Linear classifier a decision boundary
figure

The two-dimensional diagram shows how a line divides the predicted classes and how θ determines its orientation. section 5.2

Correctly separating the training points does not necessarily determine a single boundary: different values of θ and θ₀ can make the same predictions. A support vector machine adds a geometric criterion. For a point x, its distance to the boundary is |θ·x + θ₀| / ||θ||. Choose a correctly classifying boundary that maximizes the smallest such distance across the training points—the margin. This can be posed as a quadratic optimization problem with linear classification constraints and a small-||θ|| objective. section 5.3

Figure 5.8 Max margin solution of SVM classifier
figure

The maximum-margin diagram distinguishes the decision boundary from the margin boundaries pushed outward toward the training points. section 5.3

From labels to a boundary

On the iris dataset, fit a perceptron to binary labels and use the sign of θ·x + θ₀ to predict a class. Compare predictions with ground truth to count mistakes or form a confusion matrix. A maximum-margin classifier instead uses the training points’ distances from the boundary to choose among separating classifiers. section 5.2 section 5.3

How Machine Learning Algorithms in Depth covers it

How deep it goes
Derives the linear hyperplane interpretation, then formulates boundary selection through point-to-boundary distance and maximum-margin optimization.
Examples
Uses a two-dimensional linear-classifier diagram, an iris perceptron, and a maximum-margin support vector machine diagram.
What it assumes
Assumes feature vectors and labeled examples; develops the boundary geometry using inner products, hyperplanes, and vector norms.
What you can do after
Build it from scratch with a perceptron, or evaluate/understand why a support vector machine favors a maximum-margin boundary.
How it connects
Connects the decision boundary to perceptrons, support vector machines, classification loss, regularization, and the confusion matrix.

Also explained in

Compare how 4 books explain decision boundary →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning Algorithms in Depth. The section links point to the parts of the book it draws on.