Support Vector Machine - Finding the Optimal Separating Line
Support Vector Machine (SVM)
is a machine learning algorithm that finds the best decision boundary
to separate data.
For example, suppose we need to classify emails as spam or not spam.
If spam and regular emails form clearly distinguishable groups, SVM finds the best line (Hyperplane) that separates them.
📌 What is the best line to separate two groups?
SVM doesn’t just classify—it finds the decision boundary that maximizes the margin, the distance between the closest points from each class.
Data | Mail Type | Word Count | Domain Trust |
---|---|---|---|
A | Spam | 100 | Low |
B | Spam | 90 | Low |
C | Regular | 30 | High |
D | Regular | 40 | High |
When plotting this data, the X-axis can represent Word Count
and the Y-axis Domain Trust
.
In the graph above, each element signifies:
- Red ✖ → Spam email
- Blue ✖ → Regular email
- X-axis: Word Count
- Y-axis: Domain Trust
- Bold black line →
Decision Boundary
(optimal line separating spam and regular emails) - Two dashed lines →
Margin
(distance between the decision boundary and support vectors)
SVM finds the line that optimally separates spam from regular emails.
The data points closest to this line are referred to as Support Vectors
.
Support Vectors
are the critical data points that define the decision boundary; if they change, the boundary changes.
How the Support Vector Machine Works
The process by which SVM classifies data is as follows.
1. Finding the Hyperplane
SVM identifies the hyperplane that best divides the data.
In 2D, this hyperplane is a line, and in 3D, it becomes a plane.
2. Maximizing the Margin
Maximizing the distance between the hyperplane and the nearest data (Support Vectors).
This ensures more accurate classification when new data is introduced.
SVM uses the learned decision boundary to classify new data, such as determining whether an email is spam or not.
Support Vector Machines are powerful algorithms for finding clear boundaries and are used in various fields such as image classification, text classification, and more.
In the next session, we'll explore the k-means clustering
algorithm.
What is the role of the line that a Support Vector Machine (SVM) searches for?
A line that randomly separates the data
A line that calculates the average of the data
A line that maximizes the margin between two groups
A line representing the median of the data
Lecture
AI Tutor
Design
Upload
Notes
Favorites
Help