/SVM-Decision-Boundary-Animator

Animates the SVM Decision Boundary Hyperplane on the Iris data

Primary LanguagePython

SVM-Decision-Boundary-Animator

Animates the SVM Decision Boundary Hyperplane on the Iris data

Repository consists of a script file, hyperplane generator function and the gif file.

  1. Script File: Loads, normalises, and organises the Iris dataset from Sklearn package. Then generates an SVM model. Rather than feeding all the data, it dynamically samples into the training set one-by-one to see how training accuracy and the decision boundary hyperplane parameters vary over time. Finally it animates the varying parameters and saves in a gif file.

  2. Hyperplane generator: A function to generate SVM decision boundary hyperplane

Following animation is generated by the script file, samples with black edges are the support vectors: gif1

Below animation compares the learning paths of Radial Basis Function (RBF) and Linear kernels. No parameter tuning was made, default values of C=1, gamma="Auto" are used:

gif2