BRAGA

02 Writing02-02 Notes02-02-468

Subject to

Published 16 Apr 20263 min read
Contents
  1. 01Deep Breakdown
  2. 02Hard-margin case
  3. 03Soft-margin case
  4. 04Flowchart
yi(w⊤xi+b)≥1−ξi,  ξi≥0oryi(w⊤xi+b)≥1y_i(w^\top x_i + b) \ge 1 - \xi_i,\; \xi_i \ge 0 \quad \text{or} \quad y_i(w^\top x_i + b) \ge 1
(1)

We are working on the constraint set in Support Vector Machines, which defines the geometric margin conditions for either hard-margin or soft-margin classification. The canonical constraints are

yi(w⊤xi+b)≥1y_i(w^\top x_i + b) \ge 1
(2)

for hard-margin SVM, and

yi(w⊤xi+b)≥1−ξi,ξi≥0y_i(w^\top x_i + b) \ge 1 - \xi_i,\quad \xi_i \ge 0
(3)

for soft-margin SVM, where yi∈{−1,+1}y_i \in \{-1,+1\}, ww is the separating hyperplane normal vector, bb is the intercept, and ξi\xi_i are slack variables that allow margin violations.

Deep Breakdown

In an SVM, the phrase subject to is not a minor detail. It is the geometric heart of the optimization problem. The objective may say “maximize margin” or “minimize complexity plus violations,” but the constraints define what it means for a classifier to be acceptable.

For a linear classifier, the decision rule is:

f(x)=w⊤x+bf(x) = w^\top x + b
(4)

and the predicted class is:

y^=sign⁡(w⊤x+b)\hat{y} = \operatorname{sign}(w^\top x + b)
(5)

The SVM constraints require that training points lie on the correct side of the separating hyperplane, and not just barely, but with a margin.

Hard-margin case

If the data is perfectly linearly separable, the constraint is:

yi(w⊤xi+b)≥1y_i(w^\top x_i + b) \ge 1
(6)

This means:

  • if yi=+1y_i = +1, then we require:
w⊤xi+b≥1w^\top x_i + b \ge 1
(7)
  • if yi=−1y_i = -1, then we require:
w⊤xi+b≤−1w^\top x_i + b \le -1
(8)

So the points are forced outside the two margin boundaries:

w⊤x+b=1andw⊤x+b=−1w^\top x + b = 1 \quad \text{and} \quad w^\top x + b = -1
(9)

Soft-margin case

If the data is not perfectly separable, we introduce slack variables ξi\xi_i and use:

yi(w⊤xi+b)≥1−ξiy_i(w^\top x_i + b) \ge 1 - \xi_i
(10)

with

ξi≥0\xi_i \ge 0
(11)

Now some points can violate the ideal margin. The slack variable tells us how badly. This constraint set matters in DA/DS because it explains:

  • which points become support vectors,
  • which points lie safely outside the margin,
  • which points lie inside the margin,
  • which points are misclassified,
  • why the hinge loss has the form it does.

Inputs:

  • labeled data (xi,yi)(x_i, y_i),
  • hyperplane parameters ww and bb,
  • optionally slack variables ξi\xi_i.

Outputs:

  • a feasible set of classifiers that respect the margin logic.

Why it matters in practice:

  • it defines the geometry of classification,
  • it controls robustness to noise and overlap,
  • it determines which points actively constrain the model,
  • it provides the bridge between geometric margin and optimization.

This object links directly to:

  • Soft Margin Optimization (Primal), because these are its constraints,
  • Hard Margin SVM, because the hard-margin case is the zero-slack version,
  • Hinge Loss, because the minimum feasible slack is the hinge-loss value,
  • Primal and dual forms, because these constraints generate the KKT structure and support-vector behavior.

Flowchart

Start withlabeled point(x_i, y_i)Compute scorew^T x_i + bMultiply by label:y_i(w^T x_i + b)Checkhard-marginconditiony_i(w^T x_i + b)≥ 1Ifnon-separable,allow slack ξ_iChecksoft-marginconditiony_i(w^T x_i + b)≥ 1 - ξ_iEnforce ξ_i ≥ 0Classify pointstatusOutside margin:ξ_i = 0 andmargin 1On margin: ξ_i =0 and margin =1Inside margin ormisclassified: ξ_i0Support vectorsand violationsshape thesolution

#machine-learning#machine-learning-algorithms#support-vector-machines-svm-and-classification

Keyboard shortcuts

Single keys, ignored while typing in a field or with Cmd, Ctrl or Alt held.

0
Home
1 2 3 4
Work, Writing, Tools, About
j / k
Next / previous section on this page
n / p
Next / previous project or essay
u
Up one level
l
Deutsch
t
Light or dark theme
?
This list
Esc
Close