In this video, I walk through how support vector machines work in a visual way, and then go step by step through how to write a Python script to use SVMs to classify muffin and cupcake recipes.
In Part 1a, I visually define the following terms:
– Margin
– Support vectors
– Hyperplane
In Part 1b, I go through the following steps in a Jupyter Notebook:
– Import libraries (pandas, numpy, sklearn, matplotlib)
– Import data
– Prepare the data
– Fit the model
– Visualize results
– Predict a new case
In Part 2, I talk about ways to tune the model:
– Higher dimensions
– Multiple classes
– C parameter
– Kernel trick (RBF with gamma)
In Part 3, I talk about the pros and cons of SVM.
You can find all of my code and data on Github: https://github.com/adashofdata
Add comment