The surface in input space that separates regions assigned to different classes — for linear classifiers, a hyperplane defined by .

Definition

In a binary classifier, the decision boundary is the set of points where the classifier transitions from predicting one class to the other. For logistic-regression and other linear classifiers, this boundary is the hyperplane:

where (dummy variable for the bias).

Geometry

The dimensionality of the boundary is always one less than the input space:

Input dimensions Boundary
2Line
3Plane
-dimensional hyperplane

The weight vector (excluding ) is the normal to the hyperplane — it points toward the class-1 side. The bias shifts the hyperplane away from the origin.

Distance and Confidence

In logistic-regression, the signed quantity measures how far is from the boundary (up to scaling by ):

  • : far into the class-1 region, — high confidence.
  • : far into the class-0 region, — high confidence.
  • : near the boundary, — maximum uncertainty.

The sigmoid function translates this signed distance into a smooth probability.

Linearity and Its Limits

Logistic regression produces a linear boundary regardless of the data. If the true classes are not linearly separable (e.g., one class surrounds the other), a linear boundary cannot correctly classify all points. Two strategies for handling this appear later in the module:

  1. Non-linear feature transformations — map inputs to a higher-dimensional space where the classes become linearly separable.
  2. Kernel methods / SVMs — implicitly work in a transformed space without computing the transformation directly.

Margin

Logistic regression finds a separating hyperplane but does not optimize the margin — the minimum distance from the boundary to the nearest training point. A larger margin means the classifier is more robust to small perturbations in the data. Support Vector Machines (covered in weeks 3–5) explicitly maximize the margin.

Active Recall