Day 17 β Understanding Support Vector Machines (SVMs)
Hey everyone π Dhairya here,
Today, I explored Support Vector Machines (SVMs) β a powerful algorithm that can classify data by finding the best possible boundary between classes.
After spending the last few days learning about ensemble methods and boosting, SVM felt like a completely different approach. It focuses not on building many models, but on finding the most optimal separation line β and thatβs what makes it special.
π’ What I Learned Today
1. The Intuition Behind SVM
The goal of SVM is to find the hyperplane that best separates classes with the maximum margin.
Data points closest to this boundary are called support vectors.
The larger the margin, the better the model can generalize.
2. Kernels in SVM
SVMs can handle both linear and non-linear data by using kernel functions:
Linear Kernel β best for linearly separable data.
Polynomial Kernel β handles curved boundaries.
RBF (Radial Basis Function) β the most common, maps data into higher dimensions for complex separation.
3. Hyperparameters in SVM
C (Regularization parameter):
Controls trade-off between margin width and classification errors.Gamma:
Controls how far the influence of a single training example reaches.
4. Evaluation
Compared LinearSVC and SVC (RBF Kernel) on a synthetic dataset.
Visualized how changing
Candgammaaffects the decision boundary.
π± Reflections
SVMs taught me that simplicity and geometry can create powerful models.
Itβs fascinating how the algorithm focuses on the most critical points (support vectors) rather than the entire dataset.
Theyβre not always the fastest for huge datasets, but for medium-sized problems, SVMs are incredibly accurate and elegant.
π» Notebook
My Day 17 notebook is available here π GitHub Link β Day 17 Notebook
π Resources
π₯ YouTube
π Websites
π― Whatβs Next?
For Day 18, Iβll move into K-Nearest Neighbors (KNN) β a simple yet surprisingly powerful instance-based learning algorithm.
See you tomorrow π
β Dhairya
About the author
I'm a student, trying to find experience and develop skills, and I want to log that journey here. ππ
Comments
Join the discussionNo comments yet. Be the first to comment.