SVM

Playground

Data

Left-click drops a point of the active class. Right-click cycles to the next class.

Kernel

Hyperparameters

C (regularization)
γ (gamma)
degree
coef0

Live stats

StatusIdle
Training points accuracy—
Margin (1 / ‖w‖)—
Support vectors—
Iterations—
Mode—
Classes—

How to use

  1. Pick a class (1–10) and click on the canvas to scatter points, or pick a quick demo.
  2. Choose a kernel and adjust C, γ, degree, coef0.
  3. Click Train SVM for automatic training or you can click Step to see the training process.
  4. With 2 classes you get a binary SVM (boundary + margins shown). For 3–10 classes, multiclass classification can be handled using either one-vs-all or one-vs-one strategies, and the canvas is colored according to the predicted class regions.
  5. Use Export PNG to save the current visualization.

How to read the live stats

These signals tell you what the model learned. Each run may produce slightly different results because SMO starts from a random initialization — accuracy and margin can vary between runs. This is normal, not a bug.

Training points accuracy

How many points are on the correct side of the boundary. Hits 100% early on separable data — but that doesn't mean training is finished. SVM keeps going to find the best separator, not just any feasible one.

Margin (1 / ‖w‖)

Distance from the boundary to the nearest margin line — the quantity SVM is maximizing. Grows steadily until it plateaus at the optimum, even while accuracy is already at 100%.

Bottom line: if you see accuracy = 100% early, don't stop — the algorithm is still maximizing the margin, which is the actual goal.