HomeAI & Machine LearningPitch Classifier — Support Vector Machine Live

⚾ Pitch Classifier — Support Vector Machine Live

Watch a real kernel Support Vector Machine learn the maximum-margin boundary between simulated pitch types live, from genuine spin-rate and velocity features.

AI & Machine Learning3DModerate60 FPS
ai-baseball-pitch-classification ↗ Open standalone

About Support Vector Machines

A Support Vector Machine finds the hyperplane that separates two classes with the widest possible margin, using only the "support vectors" nearest the boundary. This page trains one live on simulated pitch-tracking data: release velocity and spin rate for fastballs, curveballs, and (optionally) sliders. The optimiser is a genuine simplified Sequential Minimal Optimisation (SMO) routine solving the dual soft-margin quadratic program — nothing about the boundary, margin, or support-vector set is scripted.

What is a Support Vector Machine (SVM)?

A Support Vector Machine is a supervised classifier that finds the hyperplane separating two classes with the largest possible margin. The nearest points to that hyperplane are the support vectors; they alone determine where the boundary sits.

How does the kernel trick let an SVM draw curved boundaries?

The dual optimisation only needs dot products between training points. Replacing that dot product with a kernel function K(x,z) implicitly maps points into a higher-dimensional space where a straight hyperplane corresponds to a curved boundary back in the original feature space.

What does the regularisation parameter C control?

C trades off margin width against training-point violations in the soft-margin objective ½‖w‖² + C·Σξᵢ. Small C favours a wide margin and tolerates some misclassified points; large C fits the training data tightly and risks overfitting.

How is the SVM actually solved?

Via a simplified SMO routine: repeatedly pick a pair of Lagrange multipliers that violate the KKT conditions, solve their two-variable subproblem analytically, update the bias, and repeat until convergence — the same dual coordinate-ascent idea behind libsvm.

⚙ Under the hood

Watch a real kernel Support Vector Machine learn the maximum-margin boundary between simulated pitch types live, from genuine spin-rate and velocity features.

Three.jsWebGLAIMachine Learning

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)