Lensa ML
Lensa ML

Support Vector Machines

Step 1 of 6

Maximum Margin

Finding the widest street

-3-2-1123-3-2-1123
ANGLE
45°
MARGIN
0.49
MISCLASSIFIED
0
SUPPORT VEC.
1

SVM finds the hyperplane that maximizes the margin between classes. Current margin: 0.49 — try different angles to find the widest street.

Step 1 of 6: Maximum Margin

Finding the widest street

-3-2-1123-3-2-1123
ANGLE
45°
MARGIN
0.49
MISCLASSIFIED
0
SUPPORT VEC.
1

SVM finds the hyperplane that maximizes the margin between classes. Current margin: 0.49 — try different angles to find the widest street.

Step 2 of 6: Support Vectors

The critical few

-3-2-1123-3-2-1123drag me
SUPPORT VECTORS
1
MARGIN WIDTH
0.11
POINT Y OFFSET
0.0

Only points on the margin boundary determine the decision surface — these are support vectors. The dragged point is far from the margin — moving it has no effect on the boundary.

Step 3 of 6: Soft Margin

Tolerating some errors

-3-2-1123-3-2-1123
C
1.00
MARGIN
1.40
VIOLATIONS
30
ACCURACY
20%

Moderate C (1.0): Balanced trade-off between margin width and classification errors.

Step 4 of 6: The Kernel Trick

Mapping to higher dimensions

-3-2-1123-3-2-1123
KERNEL
Polynomial
SUPPORT VEC.
0
ACCURACY
100%

Polynomial kernel: implicitly maps data to higher dimensions where curved boundaries can separate non-linear patterns.

Step 5 of 6: RBF Gamma

Controlling boundary flexibility

-3-2-1123-3-2-1123
GAMMA
0.40
TRAIN ACC
100%
TEST ACC
100%
SUPPORT VEC.
0

Moderate γ (0.40): Balanced boundary flexibility. Good generalization between training and test data.

Step 6 of 6: Multi-class SVM

One-vs-Rest strategy

-3-2-1123-3-2-1123
CLASSES
3
OvR CLASSIFIERS
3
ACCURACY
100%

For 3 classes, SVM trains 3 one-vs-rest classifiers and picks the highest confidence. Each of the 3 classifiers learns to separate one class from all others.