
Discover the theory-first objectives of this SVM course, emphasizing understanding over coding, covering hyperparameters and applications to image recognition, medical diagnosis, spam detection, and regression.
Explore the beginner's corner, where practical SVM usage on data is demonstrated through image classification with the handwritten digits MLS dataset, breast cancer diagnosis, and concrete strength regression.
Classify handwritten digits with support vector machines in Python by flattening 28x28 images to 784 features, scaling to 0–1, then training and evaluating on train and test sets.
Apply a support vector machine to detect spam in sms messages using tf-idf features and a train-test split, achieving about 98% accuracy while examining misclassified examples.
Apply support vector machines to breast cancer diagnosis, comparing linear and RBF kernels on scaled real-valued features to predict malignant versus benign with train-test evaluation.
Frame linear classification as a geometry problem, separating data with lines and planes using the form W transposed X plus b. Explore dimensionality, hyperplanes, and SVM concepts in practice.
Explore how to handle nonlinear problems with support vector machines in Python by using feature engineering and polynomial expansions, including distance-based features and interaction terms.
Treat linear classifiers as geometry problems using W^T X + B to define the boundary. Use logistic regression with loss and regularization, then prepare for SVM with nonlinear features.
Explore linear SVMs in Python as maximum margin classifiers, covering margins, quadratic programming, soft margin with misclassified points, and the link to logistic regression losses.
this lecture explains the intuition of linear SVM, defining the best line as the middle between two data clouds and maximizing the margin, i.e., the minimum distance to points.
Explore linear SVM margins by defining the functional and geometric margins, and relate them to the separating hyperplane, the distance to data points, and scale invariance.
Explore soft margin support vector machines in Python, introducing slack variables to handle nonlinearly separable data and outliers, balancing margin size with misclassification penalty via the C parameter.
Implement a linear SVM trained with gradient descent in Python, applying it to the breast cancer data set and Gaussian clouds, and visualize the decision boundary with margins.
Explore primal and dual optimization to transform linear SVM into nonlinear SVM, and learn how support vectors and product-based training and prediction enable nonlinear classification with linearly separable data.
Explore primal duality in support vector machines using Lagrange multipliers and the Lagrangian to derive conditions that align primal and dual problems, including equality and inequality constraints.
Apply lagrangian duality to svm objective, transform primal into its dual, derive W = sum_i alpha_i y_i phi(x_i) and impose sum_i alpha_i y_i = 0 with alpha_i ≥ 0.
Derive the linear program dual from the primal with the Lagrangian and multipliers, impose y ≥ 0 and a^T y = C, and relate it to the SVM dual.
Transform linear SVM into nonlinear SVM using the kernel trick, replacing explicit feature expansion with kernel functions for efficient, high-dimensional learning.
Explore polynomial kernels in SVMs to capture polynomial terms without expanding features, including linear terms, interaction terms, and a constant term, for any degree.
Learn how to tune the Gaussian kernel SVM by selecting gamma and C, balancing misclassification penalties, bias-variance, and the complexity of the decision boundary with respect to overfitting and underfitting.
Demonstrate that the Gaussian kernel corresponds to infinite dimensional features and remains a valid kernel expressed as a dot product expansion.
Explore less popular kernels for nonlinear SVMs, including the sigmoid kernel and its neural network parallels. Learn how string kernels apply to non-numeric data and note Mercer’s condition limitations.
Explore Mercer's condition by verifying the kernel matrix is positive semidefinite for the training data, linking kernel validity to a dot-product feature expansion.
Apply kernel SVMs to create non-linear decision boundaries using the kernel trick, tune bias-variance with C and gamma, and explore polynomial, Gaussian, sigmoid, and string kernels, guided by Mercer's condition.
Explore implementing an SVM with projected gradient descent in Python, using linear, RBF, and sigmoid kernels, training with alpha updates, bias calculation, and decision boundaries.
Learn how the SMO algorithm for training support vector machines in Python uses coordinate ascent to optimize two alphas at a time, respecting the zero-sum and box constraints.
Explore how radial basis function networks use gaussian kernels and support vectors to shape the SVM decision boundary in Python, with alpha and bias parameters and gamma controlling kernel precision.
Discover scalable approximations for RBF networks in Python, including the RBF sampler and Nyström method, to approximate kernels with low-dimensional feature transformers and a linear model.
Explores a neural network SVM hybrid by selecting random or uncertain training points as static weights, using k-means or gaussian mixtures, and evaluating with sigmoid kernel and cross-validation.
View SVMs as neural networks, form an rbf network with gaussian kernel, apply a two-stage feature extraction and linear classification, and compare random kitchen sink, Nyström, and sigmoid kernel landmarks.
Install data science libraries on Windows with one-click Anaconda, isolating environments and Python versions, including NumPy, SciPy, Matplotlib, and Pandas, then add TensorFlow and PyTorch via pip or conda.
Set up a cross-platform development environment for machine learning, installing NumPy, SciPy, Matplotlib, Pandas, IPython, Theano, and TensorFlow via a virtual machine with Ubuntu.
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
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!
"If you can't implement it, you don't understand it"
Or as the great physicist Richard Feynman said: "What I cannot create, I do not understand".
My courses are the ONLY courses where you will learn how to implement machine learning algorithms from scratch
Other courses will teach you how to plug in your data into a library, but do you really need help with 3 lines of code?
After doing the same thing with 10 datasets, you realize you didn't learn 10 things. You learned 1 thing, and just repeated the same 3 lines of code 10 times...
Suggested Prerequisites:
Calculus
Matrix Arithmetic / Geometry
Basic Probability
Logistic Regression
Python coding: if/else, loops, lists, dicts, sets
Numpy coding: matrix and vector operations, loading a CSV file
WHAT ORDER SHOULD I TAKE YOUR COURSES IN?:
Check out the lecture "Machine Learning and AI Prerequisite Roadmap" (available in the FAQ of any of my courses, including the free Numpy course)
UNIQUE FEATURES
Every line of code explained in detail - email me any time if you disagree
No wasted time "typing" on the keyboard like other courses - let's be honest, nobody can really write code worth learning about in just 20 minutes from scratch
Not afraid of university-level math - get important details about algorithms that other courses leave out