Vismo · Create · Library · Topics · Guides · Pricing

Logistic regression: a separating line and a probability curve

Two clusters of labeled points sit on a plane while a straight line rotates and shifts, searching for the orientation that best separates them, with misclassified points highlighted as it moves. Once settled, the animation shows how each point's signed distance z to that line feeds into sigma(z)=1/(1+e^-z), producing a probability: exactly 0.5 on the boundary, approaching 0 or 1 farther away. Useful for students learning logistic regression and the geometric meaning of decision boundaries.

16:9 · every frame verified for overlaps, spacing and edges before rendering

The prompt that made it

Two classes of points, a boundary line rotating until few are misclassified, then the sigmoid sigma(z) = 1/(1+e^-z) mapping the signed distance z to a probability: 50/50 on the line, near-certain far from it.

Make your own version

Make the next one in this series

Related animations

The normal distribution: the 68-95-99.7 rule
The normal distribution: the 68-95-99.7 rule

A normal distribution curve is built up with shaded bands marking one, two, and three standard deviations from…

Underfitting and overfitting
Underfitting and overfitting

Ten noisy training points and three held-out test points are fit with polynomials of degree 1, 3, and 9. The a…

Bayes' theorem: a positive test is not a diagnosis
Bayes' theorem: a positive test is not a diagnosis

A population of 200 people, 5% sick, is tested with a 90% sensitive, 90% specific test. The animation counts o…

The binomial distribution: heads in n coin flips
The binomial distribution: heads in n coin flips

Bar charts show P(k) = C(n,k)/2^n for n = 1, 2, 3, 4, 6, 8, and 10, with heights generated directly from Pasca…

Least squares: the line with the smallest squared errors
Least squares: the line with the smallest squared errors

Seven scattered points appear alongside a movable line, with vertical residuals shown as squares whose areas s…

Linear Vs Logistic Regression Explained
Linear Vs Logistic Regression Explained

This animation compares two foundational machine learning models side by side. It shows linear regression fitt…