Other Ques From: Ch.1 from the 'Hundred-Page Machine Learning Book'
In Support Vector Machines (SVM), the margin is the distance between the decision boundary (the separating hyperplane) and the closest data points from each class.
📌 Key Points:
-
Support Vectors
-
The data points that lie closest to the decision boundary.
-
They "support" or define the position and orientation of the boundary.
-
-
Margin Definition
-
The margin is measured as the perpendicular distance from the decision boundary to the nearest support vector from either class.
-
In a maximum-margin classifier, SVM chooses the boundary that maximizes this distance.
-
-
Why Maximize the Margin?
-
A larger margin means the decision boundary is farther from any training data point, which usually improves generalization on unseen data.
-
This aligns with the structural risk minimization principle: simpler decision boundaries generalize better.
-
📐 Formula for Margin
For a linear SVM, the margin is:
Where:
-
= weight vector defining the hyperplane
🖼 Intuition Example:
Imagine two parallel lines enclosing the training points of both classes:
-
The middle line between them is the decision boundary.
-
The distance from this middle line to either parallel line is half the margin.
-
SVM’s goal is to push these lines as far apart as possible while still separating the classes.
If you want, I can create a visual diagram showing an SVM decision boundary with the margin and support vectors labeled. That usually makes this concept much clearer.
Do you want me to make it?
No comments:
Post a Comment