Machine Learning and AI: Support Vector Machines in Python

Artificial Intelligence and Data Science Algorithms in Python for Classification and Regression

Register for this Course

$29.99 $199.99 USD 85% OFF!

Login or signup to register for this course

Have a coupon? Click here.

Course Data

Lectures: 73
Length: 8h 53m
Skill Level: All Levels
Languages: English
Includes: Lifetime access, certificate of completion (shareable on LinkedIn, Facebook, and Twitter), Q&A forum

Course Description

Support Vector Machines (SVM) are one of the most powerful machine learning models around, and this topic has been one that students have requested ever since I started making courses.

These days, everyone seems to be talking about deep learning, but in fact there was a time when support vector machines were seen as superior to neural networks. One of the things you’ll learn about in this course is that a support vector machine actually is a neural network, and they essentially look identical if you were to draw a diagram.

The toughest obstacle to overcome when you’re learning about support vector machines is that they are very theoretical. This theory very easily scares a lot of people away, and it might feel like learning about support vector machines is beyond your ability. Not so!

In this course, we take a very methodical, step-by-step approach to build up all the theory you need to understand how the SVM really works. We are going to use Logistic Regression as our starting point, which is one of the very first things you learn about as a student of machine learning. So if you want to understand this course, just have a good intuition about Logistic Regression, and by extension have a good understanding of the geometry of lines, planes, and hyperplanes.

This course will cover the critical theory behind SVMs:

  • Linear SVM derivation
  • Hinge loss (and its relation to the Cross-Entropy loss)
  • Quadratic programming (and Linear programming review)
  • Slack variables
  • Lagrangian Duality
  • Kernel SVM (nonlinear SVM)
  • Polynomial Kernels, Gaussian Kernels, Sigmoid Kernels, and String Kernels
  • Learn how to achieve an infinite-dimensional feature expansion
  • Projected Gradient Descent
  • SMO (Sequential Minimal Optimization)
  • RBF Networks (Radial Basis Function Neural Networks)
  • Support Vector Regression (SVR)
  • Multiclass Classification


As a bonus, you will also get material for how to apply the "Kernel Trick" to other machine learning models. This is how you can use a model which is normally "weak" (such as linear regression) and make it "strong". I've chosen models from various different areas of machine learning.

  • Kernel Linear regression (for regression)
  • Kernel Logistic regression (for classification)
  • Kernel K-means clustering (for clustering)
  • Kernel Principal components analysis (PCA) (for dimensionality reduction)


See here what linear regression can be capable of:



And logistic regression:



When the kernel trick is applied!

For those of you who are thinking, "theory is not for me", there’s lots of material in this course for you too!

In this course, there will be not just one, but two full sections devoted to just the practical aspects of how to make effective use of the SVM.

We’ll do end-to-end examples of real, practical machine learning applications, such as:

  • Image recognition
  • Spam detection
  • Medical diagnosis
  • Regression analysis


For more advanced students, there are also plenty of coding exercises where you will get to try different approaches to implementing SVMs.

These are implementations that you won't find anywhere else in any other course.

Thanks for reading, and I’ll see you in class!



Suggested Prerequisites:

  • calculus
  • matrix arithmetic (adding, multiplying)
  • probability
  • Python coding: if/else, loops, lists, dicts, sets
  • Numpy coding: matrix and vector operations, loading a CSV file
  • logistic regression


Tips for success:

  • Use the video speed changer! Personally, I like to watch at 2x.
  • Take handwritten notes. This will drastically increase your ability to retain the information.
  • Write down the equations. If you don't, I guarantee it will just look like gibberish.
  • Ask lots of questions on the discussion board. The more the better!
  • Don't get discouraged if you can't solve every exercise right away. Sometimes it'll take hours, days, or maybe weeks!
  • Write code yourself, this is an applied course! Don't be a "couch potato".

Testimonials and Success Stories


I am one of your students. Yesterday, I presented my paper at ICCV 2019. You have a significant part in this, so I want to sincerely thank you for your in-depth guidance to the puzzle of deep learning. Please keep making awesome courses that teach us!

I just watched your short video on “Predicting Stock Prices with LSTMs: One Mistake Everyone Makes.” Giggled with delight.

You probably already know this, but some of us really and truly appreciate you. BTW, I spent a reasonable amount of time making a learning roadmap based on your courses and have started the journey.

Looking forward to your new stuff.

Thank you for doing this! I wish everyone who call’s themselves a Data Scientist would take the time to do this either as a refresher or learn the material. I have had to work with so many people in prior roles that wanted to jump right into machine learning on my teams and didn’t even understand the first thing about the basics you have in here!!

I am signing up so that I have the easy refresh when needed and the see what you consider important, as well as to support your great work, thank you.

Thank you, I think you have opened my eyes. I was using API to implement Deep learning algorithms and each time I felt I was messing out on some things. So thank you very much.

I have been intending to send you an email expressing my gratitude for the work that you have done to create all of these data science courses in Machine Learning and Artificial Intelligence. I have been looking long and hard for courses that have mathematical rigor relative to the application of the ML & AI algorithms as opposed to just exhibit some 'canned routine' and then viola here is your neural network or logistical regression. ...

READ MORE

I have now taken a few classes from some well-known AI profs at Stanford (Andrew Ng, Christopher Manning, …) with an overall average mark in the mid-90s. Just so you know, you are as good as any of them. But I hope that you already know that.

I wish you a happy and safe holiday season. I am glad you chose to share your knowledge with the rest of us.

Hi Sir I am a student from India. I've been wanting to write a note to thank you for the courses that you've made because they have changed my career. I wanted to work in the field of data science but I was not having proper guidance but then I stumbled upon your "Logistic Regression" course in March and since then, there's been no looking back. I learned ANNs, CNNs, RNNs, Tensorflow, NLP and whatnot by going through your lectures. The knowledge that I gained enabled me to get a job as a Business Technology Analyst at one of my dream firms even in the midst of this pandemic. For that, I shall always be grateful to you. Please keep making more courses with the level of detail that you do in low-level libraries like Theano.

I just wanted to reach out and thank you for your most excellent course that I am nearing finishing.

And, I couldn't agree more with some of your "rants", and found myself nodding vigorously!

You are an excellent teacher, and a rare breed.

And, your courses are frankly, more digestible and teach a student far more than some of the top-tier courses from ivy leagues I have taken in the past.

(I plan to go through many more courses, one by one!)

I know you must be deluged with complaints in spite of the best content around That's just human nature.

Also, satisfied people rarely take the time to write, so I thought I will write in for a change. :)

Hello, Lazy Programmer!

In the process of completing my Master’s at Hunan University, China, I am writing this feedback to you in order to express my deep gratitude for all the knowledge and skills I have obtained studying your courses and following your recommendations.

The first course of yours I took was on Convolutional Neural Networks (“Deep Learning p.5”, as far as I remember). Answering one of my questions on the Q&A board, you suggested I should start from the beginning – the Linear and Logistic Regression courses. Despite that I assumed I had already known many basic things at that time, I overcame my “pride” and decided to start my journey in Deep Learning from scratch. ...

READ MORE

By the way, if you are interested to hear. I used the HMM classification, as it was in your course (95% of the script, I had little adjustments there), for the Customer-Care department in a big known fintech company. to predict who will call them, so they can call him before the rush hours, and improve the service. Instead of a poem, I Had a sequence of the last 24 hours' events that the customer had, like: "Loaded money", "Usage in the food service", "Entering the app", "Trying to change the password", etc... the label was called or didn't call. The outcome was great. They use it for their VIP customers. Our data science department and I got a lot of praise.

Lectures

Welcome

4 Lectures · 18min
  1. Introduction (02:20) (FREE preview available)
  2. Course Objectives (04:54)
  3. Course Outline (05:49)
  4. Where to get the code and data (05:48)

Beginner's Corner

7 Lectures · 46min
  1. Beginner's Corner: Section Introduction (05:18)
  2. Image Classification with SVMs (06:00)
  3. Spam Detection with SVMs (11:47)
  4. Medical Diagnosis with SVMs (05:15)
  5. Regression with SVMs (05:35)
  6. Cross-Validation (07:20)
  7. How do you get the data? How do you process the data? (05:21)

Review of Linear Classifiers

8 Lectures · 53min
  1. Basic Geometry (10:52)
  2. Normal Vectors (03:41)
  3. Logistic Regression Review (09:45)
  4. Loss Function and Regularization (04:09)
  5. Prediction Confidence (07:25)
  6. Nonlinear Problems (09:58)
  7. Linear Classifiers Section Conclusion (04:25)
  8. Suggestion Box (03:03)

Linear SVM

10 Lectures · 01hr 06min
  1. Linear SVM Section Introduction and Outline (03:18)
  2. Linear SVM Problem Setup and Definitions (04:30)
  3. Margins (08:51)
  4. Linear SVM Objective (11:00)
  5. Linear and Quadratic Programming (12:31)
  6. Slack Variables (07:25)
  7. Hinge Loss (and its Relationship to Logistic Regression) (06:22)
  8. Linear SVM with Gradient Descent (03:10)
  9. Linear SVM with Gradient Descent (Code) (05:06)
  10. Linear SVM Section Summary (04:14)

Duality

7 Lectures · 43min
  1. Duality Section Introduction (03:43)
  2. Duality and Lagrangians (part 1) (13:01)
  3. Lagrangian Duality (part 2) (07:08)
  4. Relationship to Linear Programming (04:19)
  5. Predictions and Support Vectors (09:16)
  6. Why Transform Primal to Dual? (03:26)
  7. Duality Section Conclusion (02:54)

Kernel Methods

9 Lectures · 51min
  1. Kernel Methods Section Introduction (03:47)
  2. The Kernel Trick (08:11)
  3. Polynomial Kernel (06:06)
  4. Gaussian Kernel (05:13)
  5. Using the Gaussian Kernel (07:09)
  6. Why does the Gaussian Kernel correspond to infinite-dimensional features? (04:39)
  7. Other Kernels (07:04)
  8. Mercer's Condition (06:24)
  9. Kernel Methods Section Summary (02:41)

Implementations and Extensions

8 Lectures · 54min
  1. Dual with Slack Variables (10:40)
  2. Simple Approaches to Implementation (06:25)
  3. SVM with Projected Gradient Descent Code (08:19)
  4. Kernel SVM Gradient Descent with Primal (Theory) (04:30)
  5. Kernel SVM Gradient Descent with Primal (Code) (04:55)
  6. SMO (Sequential Minimal Optimization) (09:32)
  7. Support Vector Regression (05:26)
  8. Multiclass Classification (04:34)

Neural Networks

8 Lectures · 50min
  1. Neural Networks Section Introduction (02:41)
  2. RBF Networks (15:38)
  3. RBF Approximations (08:38)
  4. What Happened to Infinite Dimensionality? (02:53)
  5. Build Your Own RBF Network (03:53)
  6. Relationship to Deep Learning Neural Networks (06:50)
  7. Neural Network-SVM Mashup (07:15)
  8. Neural Networks Section Conclusion (02:36)

Setting Up Your Environment (Appendix/FAQ by Student Request)

2 Lectures · 37min
  1. Windows-Focused Environment Setup 2018 (20:20)
  2. How to install Numpy, Scipy, Matplotlib, Pandas, IPython, Theano, and TensorFlow (17:22)

Extra Help With Python Coding for Beginners (Appendix/FAQ by Student Request)

4 Lectures · 42min
  1. How to Code Yourself (part 1) (15:54)
  2. How to Code Yourself (part 2) (09:23)
  3. Proof that using Jupyter Notebook is the same as not using it (12:29)
  4. Python 2 vs Python 3 (04:38)

Effective Learning Strategies for Machine Learning (Appendix/FAQ by Student Request)

4 Lectures · 59min
  1. How to Succeed in this Course (Long Version) (10:24)
  2. Is this for Beginners or Experts? Academic or Practical? Fast or slow-paced? (22:04)
  3. What order should I take your courses in? (part 1) (11:18)
  4. What order should I take your courses in? (part 2) (16:07)

Appendix / FAQ Finale

2 Lectures · 08min
  1. What is the Appendix? (02:48)
  2. Where to get discount coupons and FREE deep learning material (05:31)

Extras

  • Kernel Methods for other machine learning models and Lagrange Duality cheatsheet
  • Kernel Linear Regression Code
  • Kernel Logistic Regression Code
  • Kernel K-Means Clustering Code
  • Kernel PCA Code
  • Calculus Cheatsheet
This website is using cookies. That's Fine