Curvingo · Made in India

Glossary

Select one of the keywords on the left…

Logistic RegressionHow It Works

Reading time: ~5 min

Kavya ma'am's model gives every student a chance of passing. To turn a chance into a decision she needs a threshold: a chance of 0.5 or more means "will pass", anything less means "needs extra classes". The number of hours where the curve crosses the threshold is the decision boundary.

Slide the S-Curve

Drag the purple knob to slide the curve. The green band marks the hours the model calls "pass", and every student it gets wrong gets a red ring.

The best boundary sits between 4 and 4.5 hours. Two students broke the pattern — one who studied 3 hours and still passed, one who studied 5.5 hours and still failed — and no single boundary can get both of them right. Real data is messy, so a model that is right 12 times out of 14 can still be the best one possible.

Moving the Threshold

The threshold 0.5 is a choice, not a law. Kavya ma'am would rather give extra classes to a few students who did not need them than miss one who is heading for a fail. Move the threshold until no student who failed is predicted to pass.

Threshold: ${t}

A stricter threshold catches every student at risk — but students who studied 4.5 or 5 hours and passed are now flagged too. Raising the threshold trades one kind of mistake for another. Measuring that trade-off is the job of precision and recall, coming up in a later chapter.

Sina