1. Introduction
Support Vector Machines (SVMs) are supervised learning models used for classification and regression.
They work by finding the optimal hyperplane that separates data points of different classes with the maximum margin.
2. Key Concepts
- Margin: The distance between the hyperplane and the nearest data points from each class.
- Support Vectors: The data points closest to the hyperplane that directly affect its position.
- Linear SVM: Works when data is linearly separable.
- Non-linear SVM: Uses the kernel trick to project data into higher dimensions for separation.
- Kernels: Functions like polynomial, RBF (Gaussian), and sigmoid used to handle complex data.
- Soft Margin: Allows misclassifications by introducing slack variables for noisy data.
3. Types of Kernels
- Linear Kernel – Works for linearly separable data.
- Polynomial Kernel – Captures polynomial relationships.
- RBF Kernel – Good for circular/complex boundaries.
- Sigmoid Kernel – Similar to neural networks.
4. Examples
Example 1: Spam vs. Non-Spam Email Classification using word frequency as features.
Example 2: Cancer detection (Malignant vs. Benign) based on cell size and shape.
Example 3: Handwritten digit recognition (0–9) using image pixel features.
5. Applications
- Text classification (spam filtering, sentiment analysis)
- Bioinformatics (protein classification, cancer detection)
- Image recognition (digits, face detection)
- Financial forecasting (fraud detection, stock trend analysis)
6. Advantages & Disadvantages
Advantages:
- Works well with high-dimensional data
- Effective for both linear and non-linear classification
- Memory efficient due to support vectors
Disadvantages:
- Computationally expensive for large datasets
- Requires careful kernel and parameter selection
7. Interactive Calculator