run il-margine.bas
MDN-119:32
DEMO by Michele di Nuzzo

The margin

MDN · LAB THE MARGIN Support Vector Machines · 1995
C
decides how much each violation of the road costs
mostra i capi della primavera-estate 2025
show the garments of spring-summer 2025 in place of the training ones
C = 0,001
C = 0.001: an extremely wide road
C = 0,133 (come nel capitolo)
C = 0.133, as in the chapter
C = 100
a narrow road

▶ Run ⬇ Download (.html)

The lab shows the widest road that the SVM traces between two classes: the Ordito garments that hold their full price and those that end up in the sales. Move C and watch the road widen and narrow. The circled garments are the support vectors, which decide where the boundary passes. The lab’s interface is in Italian.

Things to try

  • The widest road: with C = 0.133 almost only the garment’s start counts.
  • Small C: with C = 0.001 the road becomes extremely wide and the model ends up always saying “regge” (holds).
  • Large C: with C = 100 the road narrows, but accuracy stays at 91%.

The article: The margin.

The demo is a single HTML file: download it and use it offline, even without an internet connection. Licence: CC BY-NC 4.0 — you may share it, crediting the author and this page, but not for commercial purposes.