Skip to main content
Interactive 3D/Logistic Regression Decision Boundary
Logistic Regression
Gradient descent · live training
Add Points
Hyperparameters
Learning rate0.50
0.012.0
Reg. C (1/λ)1.0
0.1 (strong)10 (weak)
Training
Model State
w₁0.100
w₂0.100
bias0.000
Accuracy50.0%
Epoch0
Legend
Class 0 (square)
Class 1 (circle)
Decision boundary
Background color shows P(y=1|x). Boundary is the 50% contour where w₁x₁ + w₂x₂ + b = 0.

Logistic Regression Decision Boundary - Interactive Visualization

Logistic regression applies a sigmoid function to a linear combination of features, squashing the output to a probability between 0 and 1. The decision boundary is where the model is exactly 50% confident. This visualization lets you place points, run gradient descent on the log-loss, and see how L2 regularization pulls the boundary away from individual outliers.

  • See the sigmoid function map any real-valued score to a probability between 0 and 1
  • Add your own data points and watch the decision boundary shift to separate the classes
  • Increase L2 regularization and see the boundary become more conservative and less overfit
  • Understand log-loss (cross-entropy) as the proper cost function for probabilistic classifiers
  • Learn why logistic regression is still a go-to baseline before trying more complex models

Part of the EngineersOfAI Interactive 3D - free interactive visualizations covering every major concept in machine learning and AI engineering. Hover any element for a plain-English explanation. No code required.