Lesson 7.9: Support Vector Machine (SVM)
🔹 What is SVM?
Support Vector Machine (SVM) is a supervised learning algorithm used for classification and regression.
-
Finds a hyperplane that best separates data points of different classes.
-
Maximizes the margin between the classes.
🔹 Key Concepts
-
Hyperplane
-
Decision boundary that separates classes in n-dimensional space.
-
Support Vectors
-
Data points closest to the hyperplane.
-
Determine the position and orientation of the hyperplane.
-
Margin
-
Distance between the hyperplane and nearest data points.
-
SVM maximizes this margin for better generalization.
🔹 Kernel Trick
-
Converts non-linear data into higher-dimensional space to make it linearly separable.
-
Common kernels:
-
Linear
-
Polynomial
-
RBF (Radial Basis Function)
-
🔹 Example
-
kernel='rbf'→ Non-linear separation -
C→ Regularization parameter
🔹 Advantages
-
Effective for high-dimensional spaces.
-
Works well with clear margin separation.
🔹 Disadvantages
-
Computationally expensive for large datasets.
-
Hard to interpret compared to simple models.
✅ Quick Recap:
-
SVM → Finds hyperplane that best separates classes.
-
Uses support vectors and can handle non-linear data with kernels.
