Home▸AI & Machine Learning▸Business Decision Classifier — Logistic Regression (2D)

Business Decision Classifier — Logistic Regression (2D)

A Canvas2D logistic regression lab: gradient descent bends a straight decision line to separate two outcome classes, weights and loss updating live, point by point.

AI & Machine Learning2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-ml-business-decisions ↗ Open standalone

This 2D companion runs the exact same logistic-regression mechanic as the 3D version — z = w1·x1 + w2·x2 + b through a sigmoid, trained by mini-batch gradient descent on binary cross-entropy loss — but draws it on a plain Canvas2D context instead of an orthographic Three.js scene. Pick a dataset preset, watch the shaded decision boundary rotate into place, and track the loss curve falling as accuracy climbs.

⚙ Under the hood

Canvas2D logistic regression: sigmoid activation, mini-batch gradient descent on cross-entropy loss, a live decision-boundary heatmap and a loss-vs-step chart, all redrawn every frame.

logistic regressiongradient descentsigmoidcross-entropyclassifiermachine learning

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

What did you find?

Add reproduction steps (optional)