Classification and Kernels — Separating with a Line, Building the Widest Road

See, with pictures and motion, two kinds of points (the houses of two villages) being separated by a line that moves as it learns, or by the widest possible road.

Draw a boundary that separates points described by two descriptors into two classes, using the data. In ① you train logistic regression by gradient descent and watch the cross-entropy loss decrease; you also see the weights keep growing when the data are linearly separable and regularization is removed. In ② you change the kernel, C, and γ and see how the SVM boundary, margin, and support vectors change. In both, check whether you can explain the results by putting the numbers on the screen into the formulas of the text.

Can one line separate the ● houses from the ■ houses?

The houses of two villages stand on a map. Each time you press ▶, the border line moves a little, and the background color (which village a place seems to belong to) changes too.

These are synthetic data for teaching purposes (the positions of the houses and which village they belong to are made up; this is not a real map).

Back to Machine Learning — From Probability to GPT (Contents) | Text: Chapter 9, Section 9.3, Chapter 10, Section 10.5, Chapter 11, Section 11.5 | Equations and explanation (explanation page) | Equations are typeset with the browser’s built-in MathML (no external library).