Binary classifier with decision boundary σ(w·x + b), where σ is the sigmoid. Click the chart to add points; toggle class with the switch.
This demo shows logistic regression learning a decision boundary to separate two classes. The model learns weights w₀, w₁ and bias b such that the decision boundary is the line w₀·x + w₁·y + b = 0.
Click the plot to add training points. Use the sliders to manually adjust the boundary, or click "Train" to let gradient descent find the optimal weights automatically.
The sigmoid function converts the linear combination to a probability: p = 1/(1 + e^(-(w₀·x + w₁·y + b))). Points are classified as class 1 if p > τ (threshold).
| Pred 0 | Pred 1 | |
|---|---|---|
| Actual 0 | — | — |
| Actual 1 | — | — |
Every coffee helps keep the servers running. Every book sale funds the next tool I'm dreaming up. You're not just supporting a site — you're helping me build what developers actually need.
This module fits logistic regression for binary outcomes using maximum likelihood with optional regularization. It visualizes decision boundaries, probability surfaces, and key metrics (log‑loss, accuracy, ROC/AUC) based on synthetic or provided data.