#1 India's Top IT Training Institute

×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →
✂️ FREE · SMO IN YOUR BROWSER

SVM Visualizer: See the Margin and Support Vectors

Pick a dataset and kernel, set C and gamma, and watch a real SVM draw its boundary.

  • 📏 Margin
  • ⭕ Support vectors
  • 🌀 RBF kernel

How to use the SVM Visualizer

  1. 1. Choose dataPick separable clusters, overlapping clusters, circles, moons or XOR.
  2. 2. Set the SVMChoose a linear or RBF kernel, the penalty C and, for RBF, γ.
  3. 3. TrainSee the decision regions, margin band and ringed support vectors, with accuracy.

How an SVM works

A support vector machine finds the boundary that separates two classes with the widest possible margin. Only the points on or inside the margin, the support vectors, decide where the boundary goes. C sets how much the SVM is punished for points inside the margin or on the wrong side: small C allows a wide, forgiving margin; large C fits the training points tightly. The RBF kernel lets it draw curved boundaries, with γ controlling how far each point's influence reaches.

Training uses Platt's SMO algorithm, the method behind LIBSVM.

Worked example

On the default separable clusters (80 points, seed 3) a linear SVM with C = 10 classifies every point correctly using 12 support vectors. Its margin width (2 ÷ ‖w‖) is 0.2175. Lower C to 1 and the margin widens, taking in 42 support vectors. On the circle-inside-a-ring data no straight line works, but an RBF kernel with γ = 10 separates them using 23 support vectors.

How we checked it

  • For five dataset and kernel settings, our decision boundary agrees with scikit-learn's SVC at every point of a 30 × 30 grid.
  • The number of support vectors is the same as scikit-learn's in all five.
  • Decision values differ by less than 0.01.

Frequently asked questions

Why is training accuracy 100% but the boundary looks odd?

With a large C or γ the SVM can wrap around individual points. That fits the training data perfectly but usually generalises poorly; that's overfitting.

Does it handle more than two classes?

This visualizer shows two classes. Multi-class SVMs combine several two-class ones.

Is the SVM visualizer free?

Yes. You can open the SVM visualizer and enter everything without signing up. When you train an SVM for the first time, we ask once for your name and WhatsApp number; after that it, and every other Uncodemy tool, opens straight away.

More free tools

See all free tools