Support Vector Machines: A Visual Explanation with Sample Python Code

Published: 21 August 2017
on channel: A Dash of Data
360,139
8.1k

SVMs are a popular classification technique used in data science and machine learning.

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


On this page of the site you can watch the video online Support Vector Machines: A Visual Explanation with Sample Python Code with a duration of hours minute second in good quality, which was uploaded by the user A Dash of Data 21 August 2017, share the link with friends and acquaintances, this video has already been watched 360,139 times on youtube and it was liked by 8.1 thousand viewers. Enjoy your viewing!