Logistic Regression
A straight line, a squash function, and two clouds of dots: draw the boundary by hand, then let gradient descent show you its own.
Tip: split Two blobs cleanly by hand first — then open XOR and prove to yourself why no straight line ever can.
Try this
- Earn the clean split. On Two blobs, push the line with empty-space drags until mistakes hit 0 — then reveal and compare your line to the fit.
- Feel the squash. Park the probe far from the line (P near 0 or 1), then slide it across: probability swings fastest right at the boundary.
- Break the line. Open XOR corners and try every tilt — no straight boundary separates the corners. That failure is why neural networks have hidden layers.
How to read the boundary
Every point gets a score, w₁x₁ + w₂x₂ + b: the line is where that score equals zero. The sigmoid squashes any score into a probability — far from the line means confident, on the line means a coin flip.
Drag the weights and watch the line tilt and slide; drag the probe and read its probability. The reveal button fits the same model with gradient descent — your hand against the algorithm, same board.
Connect a score to its probability.
Move the boundary and inspect the sigmoid output in this small classifier. The displayed probabilities belong to this example model and data; explore the study map for its mathematical foundations.
Create a free account All free tools
A free account opens the first 3 lessons of each subject. Other lessons require a subscription and their prerequisites.