Support vector machine
Support Vector Machine (SVM)
Definition
Looks for the boundary between the classes that has the largest possible margin from the nearest instances (the support vectors).
Core idea
A wide margin means better generalization. With the kernel trick (Kernel Trick, such as RBF) it can draw non-linear boundaries without computing the new features explicitly.
How it works
- We normalize the features
- We choose the kernel: linear, RBF or polynomial
- We solve an optimization problem that maximizes the margin while allowing some errors (C)
- The instances on the margin are the support vectors that define the model
Data type and problem type
| Data type | Normalized numeric tabular data; and text representations |
|---|---|
| Problem type | Classification and regression (SVR) |
Strengths
- Strong performance on medium-sized data with many dimensions
- Flexible thanks to kernels
Limitations
- Slow with very large data
- Sensitive to the choice of C and gamma
- Does not give probabilities directly
Key parameters
- C
- The kernel type (kernel)
- gamma for the RBF kernel
Evaluation metrics
- Accuracy
- Precision and Recall
- F1-score
- Confusion Matrix
- ROC AUC for binary classification
Supporting tools
| Orange | SVM |
|---|---|
| KNIME | SVM Learner + SVM Predictor |
| WEKA | functions.SMO |
Applied examples
- Classifying breast tumours (for teaching)
- Text classification
- Digit recognition
