Support Vector Machine (SVM) Simulator

Interact with the parameter C to intuitively understand how SVMs balance margin maximization with classification accuracy.

Click to add points. Click an existing point to remove it.
Add Class:

Regularization Parameter (C)

Controls the trade-off between margin width and misclassifications.

Current C:
1.00
0.001 (Soft Margin) 1 (Balanced) 1000 (Hard Margin)

How C affects the model:

  • L
    Low C (Soft Margin): The SVM prioritizes maximizing the overall margin width. It is "soft" because it tolerates some points being on the wrong side of the margin or even misclassified. Reduces overfitting.
  • H
    High C (Hard Margin): The SVM strictly penalizes misclassifications. It will create a narrow margin just to correctly classify every training point perfectly. Can lead to overfitting on noisy data.

Model Statistics & Legend

Data Points
0
Support Vectors
0
Class +1
Class -1
Support Vector