Home▸Machine Learning & Neural Networks▸Logistic Regression: Sigmoid Decision Boundary (2D)

Logistic Regression: Sigmoid Decision Boundary (2D)

A 2D-canvas companion to the 3D logistic regression sim: click to add labeled points, drag the weight and bias sliders (or run real gradient descent) and watch the sigmoid probability field and the linear decision boundary redraw live.

Machine Learning & Neural Networks2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-machine-learning-basics ↗ Open standalone

Logistic regression is the workhorse of binary classification: a linear score run through a sigmoid to turn it into a probability. This 2D-canvas companion to the 3D sim renders that idea as a flat colour field — a scatter of labeled points sits over a background shaded by p(x), the sigmoid probability, with the white decision-boundary line marking exactly where the model is 50/50. Drag the weight sliders to reshape the field and watch the boundary slide across the canvas, click anywhere to drop your own labeled point and see it join the loss calculation live, or click Train step to run one real batch gradient-descent update against the binary cross-entropy loss and watch the model converge on its own.

⚙ Under the hood

A 2D-canvas companion to the 3D logistic regression sim: click to add labeled points, drag the weight and bias sliders or run real gradient descent, and watch the sigmoid probability field and decision boundary redraw live.

machine learninglogistic regressionclassificationgradient descentsigmoidcross-entropy2d

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)