Support Vector Machines in Python: Complete Tutorial

Added:

Course Intro & Goals
Modules & Data Loading
Data Cleaning & Quality
Handling Missing Values
Data Downsampling
Formatting with One-Hot Encoding
Preliminary SVM Model
Parameter Optimization
Final Model & Visualization

Course Intro & Goals

0:00
Playing Section
  • 1

    Introduces support vector machines classification project using scikit-learn and RBF kernel.

  • 2

    The dataset predicts credit card defaults using continuous and categorical data from UCI repository.

Basic Python programming proficiency, particularly using data science libraries like Pandas and NumPy for data manipulation.
Fundamental concepts of supervised machine learning, including the distinction between features, labels, classification, and regression.
Basic understanding of coordinate geometry and linear algebra, specifically the concepts of vectors, hyperplanes, and distance metrics.
The general workflow of evaluating machine learning models, including splitting data into training and testing sets.
Advanced hyperparameter tuning techniques for SVMs, such as Grid Search and Randomized Search with Cross-Validation (GridSearchCV).
Deep dive into kernel functions (e.g., Radial Basis Function (RBF), Polynomial) and understanding the 'Kernel Trick' for non-linear decision boundaries.
Dimensionality reduction techniques like Principal Component Analysis (PCA) to improve SVM performance on high-dimensional datasets.
Comparative analysis of SVMs against other supervised learning algorithms, such as Random Forests, Gradient Boosting, or Neural Networks, on the same datasets.
155K views4.2Klikes44:48@statquestOriginal Release: 2020-06-30

This tutorial demonstrates how to build and optimize a Support Vector Machine (SVM) classifier in Python using scikit-learn, covering the complete workflow from importing data and handling missing values to formatting data with one-hot encoding and centering/scaling, building a preliminary SVM, optimizing parameters using GridSearchCV with cross-validation, and finally building and interpreting the final SVM model with visualization of the decision boundary using PCA dimensionality reduction.