What is the difference between the functional margin and the geometric margin?

Quick Overview

Asks how the functional margin and the geometric margin of a linear classifier differ and why support vector machines care about the distinction. Tests understanding of scale invariance, the distance from a point to a hyperplane, and the normalization behind the SVM objective.

What is the difference between the functional margin and the geometric margin?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

Consider a linear classifier with decision function $f(x) = w \cdot x + b$ and labels $y_i \in \{-1, +1\}$. What is the difference between the functional margin and the geometric margin? ```hint Rescale the parameters Replace $(w, b)$ with $(2w, 2b)$. Does the decision boundary move, and what happens to each quantity? ``` ### What a Strong Answer Covers - The formula for each margin at a single point, and how the margin of a whole dataset is defined from the per-point values. - How each margin behaves when $w$ and $b$ are multiplied by the same positive constant. - What the geometric margin measures geometrically, and what its sign means. - How the SVM formulation deals with the scale freedom and which objective it ends up optimizing. ### Follow-up Questions - Why does the SVM primal minimize $\frac{1}{2}\|w\|^2$ instead of $\|w\|$? - How does the soft-margin formulation change the constraint on the functional margin? - In a kernel SVM, $w$ is never computed explicitly. How would you compute the geometric margin?

Overview: Asks how the functional margin and the geometric margin of a linear classifier differ and why support vector machines care about the distinction. Tests understanding of scale invariance, the distance from a point to a hyperplane, and the normalization behind the SVM objective.

Nov 24, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

Consider a linear classifier with decision function f(x)=w⋅x+bf(x) = w \cdot x + b and labels yi∈{−1,+1}y_i \in \{-1, +1\}.

What is the difference between the functional margin and the geometric margin?

What a Strong Answer Covers Guidance

  • The formula for each margin at a single point, and how the margin of a whole dataset is defined from the per-point values.
  • How each margin behaves when ww and bb are multiplied by the same positive constant.
  • What the geometric margin measures geometrically, and what its sign means.
  • How the SVM formulation deals with the scale freedom and which objective it ends up optimizing.

Follow-up Questions Guidance

  • Why does the SVM primal minimize 12∥w∥2\frac{1}{2}\|w\|^2 instead of ∥w∥\|w\| ?
  • How does the soft-margin formulation change the constraint on the functional margin?
  • In a kernel SVM, ww is never computed explicitly. How would you compute the geometric margin?