Logistic regression

Train a classifier live and watch its decision boundary and probability shading settle between two classes.

BeginnerExplained in Classification and probability

Logistic regression

Shading shows the model's probability for each spot: blue for class A, orange for class B, gray where it is unsure. Tap to add points.

  • Class A
  • Class B
  • Decision boundary (50%)
  • 10% and 90% lines
0.50
Data
Tap adds
Steps0
Mean cross-entropy0.6931
Accuracy50%
Weights w1, w2, b0, 0, 0

Try this

  • Train on Separated data and watch the 10% and 90% lines close in on the boundary.
  • Switch to Overlapping and see where the loss levels off.
  • Add points of one class inside the other’s region and retrain.

The one-input version, with sliders for the weight and bias:

From score to probability

Made-up data: hours of practice before a driving test, and whether the test was passed. The curve is the model's probability of passing.

  • Failed (y = 0)
  • Passed (y = 1)
  • Gap to the right answer (thickest: the costliest point)
0.40
-1
Mean cross-entropy0.378
Accuracy at 50%81%
50% point2.5 hours

Try "embedding", "softmax", "overfitting", or "backpropagation".