Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
3 views2 pages

SVM - Notes

Support Vector Machine (SVM) is primarily used for classification by finding the optimal hyperplane that separates classes with the maximum margin, which helps in better generalization and reduces overfitting. It employs kernels to handle non-linear data, allowing for flexible decision boundaries, and the C parameter controls the trade-off between margin size and classification error. While SVM is effective in high-dimensional spaces and with clearly separated classes, it can be slow on large datasets and requires careful selection of kernels and parameters.

Uploaded by

alphabeast0003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

SVM - Notes

Support Vector Machine (SVM) is primarily used for classification by finding the optimal hyperplane that separates classes with the maximum margin, which helps in better generalization and reduces overfitting. It employs kernels to handle non-linear data, allowing for flexible decision boundaries, and the C parameter controls the trade-off between margin size and classification error. While SVM is effective in high-dimensional spaces and with clearly separated classes, it can be slow on large datasets and requires careful selection of kernels and parameters.

Uploaded by

alphabeast0003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

SVM – Notes

SVM = Support Vector Machine

used for classification (also works for regression but not common)

idea: find a line (or hyperplane) that separates classes the best

how it works:

finds the “best” boundary between classes

best = the one with maximum margin


→ margin = distance between boundary and nearest points from each class
→ these close points = support vectors

why margin matters?

larger margin = better generalization

less chance of overfitting

linear SVM:

works when data is linearly separable (can be split by straight line)

if not, use kernel trick to map data to higher dimension

kernels:

help to deal with non-linear data

common kernels:
→ linear
→ polynomial
→ RBF (radial basis function) = Gaussian
→ sigmoid

kernel lets us draw curve instead of line without explicitly adding more features

example:
data: height and weight
goal: classify male/female
→ linear SVM draws line that separates the groups
→ if it’s not clean, RBF kernel can help draw a curve

C parameter:

controls trade-off between margin size and classification error


→ high C = less margin, try to classify everything right (risk of overfit)
→ low C = more margin, allow some errors (more general)

pros:

works well in high dimensions

effective when classes are clearly separated

uses only support vectors (not whole data)


cons:

slow on large datasets

hard to choose right kernel + parameters

doesn’t give probability (just class)

used in:

image classification

bioinformatics

handwriting recognition

face detection

reminders:

always scale data before using SVM (like between 0 and 1)

not best for big datasets but good when features are many

try different kernels to see what works best

extra note:
if data is not separable even with kernel, maybe try soft margin or just use
different model (like Random Forest or XGBoost)

You might also like