← ML demos

A LINEAR MODEL FOR PROBABILITIES

Logistic regression

Work in progress — this demo is still being developed and checked.

The same kind of boundary, with a probability on each side. Explore how confidence, loss, and learning fit together.

Click the plot to…
p = 0
p = 1

Enter a point with the keyboard

From a score to a probability

z = w₁x₁ + w₂x₂ + b
p = 1 / (1 + exp(−z))

On the boundary, z = 0 and p = 0.5. Predict 1 only when p > 0.5; ties predict 0, following the lecture.