BRAGA

02 Writing02-02 Notes02-02-466

Hypothesis Function

Published 16 Apr 20262 min read
Contents
  1. 01Deep Breakdown
  2. 02Flowchart
y^=sign⁡(w⊤x+b)\hat{y} = \operatorname{sign}(w^\top x + b)
(1)

We are working on the SVM hypothesis function, the decision rule used to make predictions after training. In the linear primal form, the canonical classifier is

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

where ww is the weight vector and bb is the intercept. In the kernelized dual form, the score is computed through support vectors and dual coefficients, and the prediction is still the sign of that score. This assumes binary labels, usually y∈{−1,+1}y \in \{-1,+1\}.

Deep Breakdown

The hypothesis function is the final predictive rule of a Support Vector Machine. After the optimization is solved, whether in primal or dual form, the model needs a way to classify a new input vector xx. For a linear SVM in primal form, the prediction rule is:

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

This means:

  • compute the score w⊤x+bw^\top x + b,
  • if the score is positive, predict class +1+1,
  • if the score is negative, predict class −1-1.

So the classifier is based on which side of the separating hyperplane the point falls. The quantity

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

is often called the decision function or score function. The actual prediction is just its sign. For kernel SVMs, the same idea remains, but the score is written in dual form:

f(x)=∑i=1nαiyiK(xi,x)+bf(x) = \sum_{i=1}^{n} \alpha_i y_i K(x_i, x) + b
(5)

and then:

y^=sign⁡(f(x))\hat{y} = \operatorname{sign}(f(x))
(6)

Here:

  • αi\alpha_i are dual coefficients,
  • xix_i are training points,
  • yiy_i are training labels,
  • K(xi,x)K(x_i, x) is the kernel function,
  • only support vectors have nonzero or effectively nonzero αi\alpha_i.

Inputs:

  • trained SVM parameters,
  • a new feature vector xx.

Outputs:

  • predicted class y^\hat{y},
  • optionally the raw score f(x)f(x).

Why it matters in DA/DS:

  • it is the actual prediction rule used in production,
  • it explains how margin-based training turns into classification decisions,
  • it shows the difference between linear and kernel SVM prediction,
  • it reveals the operational role of support vectors,
  • it helps interpret confidence-like distance from the boundary.

This object links directly to:

  • margin, because the sign comes from the side of the margin boundary,
  • support vectors, because in the dual form only they matter,
  • kernels, because the kernelized hypothesis replaces direct dot products,
  • primal and dual formulations, because both produce the same classification logic.

Flowchart

Start withtrained SVMmodelReceive newinput vector xComputedecision scoref(x)Linear case: f(x)= w^T x + bKernel case: f(x)= Σ_i α_i y_iK(x_i, x) + bTake sign ofscoreIf f(x) 0, predict+1If f(x) < 0,predict -1If f(x) = 0, pointlies on decisionboundaryReturn predictedclass

#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