- Parametric variant of nearest-neighbor classification.
- Calculate centroid of each class, and classify each test instance according to class of centroid it is nearest to.
- Goal: find a straight line/hyperplane that separates 2 classes (not always linearly separable).
- SVM finds an optimal solution:
- maximises the distance between hyperplane and difficult points close to decision boundary.
- most stable under perturbations of the inputs.
- Task: associate one class as positive, one as negative.
- Build the model: find the best hyperplane w and b, which maximises the margin between the positve and negative training instances. (optimisation problem).
- margin width is defined by a small subset of data points on the margin (support vectors)
- can be solved using quadratic programming to find the global optimum.
- Make non-linearly separable problem separable, map data into better representation space.
- Solution: transform data by applying a mapping function, and then apply a linear classifier to the new feature vectors.
- General solution: convert to two-class problem.
- one-versus-all: one classifier to separate one class from the rest of classes, choose the class which classifies test data point with greatest margin.
- one-versus-one: one classifier per pair of classes, choose the class selected by most classifiers.