Logistic Regression and Decision Thresholds
A package is either late or on time, but the evidence before departure is uncertain.
Logistic Regression and Decision Thresholds explained visually
A package is either late or on time, but the evidence before departure is uncertain. English captions are optional and start off. The complete transcript follows the written lesson.
What you will learn
A package is either late or on time, but the evidence before departure is uncertain.
Predict a binary outcome
A package is either late or on time, but the evidence before departure is uncertain. Logistic regression models a binary outcome by transforming a linear combination of features into a value between zero and one. That output can support a probability estimate, provided its quality is checked on representative data.
Separate scores from decisions
The sigmoid transformation connects the linear score to the bounded output. Training commonly uses a likelihood-based objective equivalent to binary cross-entropy. Despite its name, logistic regression is widely used for classification. It can be a useful, interpretable baseline, especially when the decision boundary is reasonably described by the chosen features and transformations.
Choose the threshold for the task
A predicted probability does not automatically determine an action. A decision threshold converts it into a class or intervention. Raising the threshold usually reduces positive predictions; lowering it usually increases them. The appropriate setting depends on the costs of missed positives and false alarms. Evaluate discrimination and calibration separately, and choose thresholds with validation data rather than tuning them repeatedly on the final test set.
A worked example
Two deliveries receive estimated late-arrival probabilities of zero point three five and zero point seven zero. At a threshold of zero point five zero, only the second triggers an alert. At zero point three zero, both trigger alerts. Neither threshold is universally correct; the useful choice depends on what an alert costs and what a missed delay costs.
Worked example
Two deliveries receive estimated late-arrival probabilities of 0.35 and 0.70. At a threshold of 0.50, only the second triggers an alert. At 0.30, both trigger alerts. Neither threshold is universally correct; the useful choice depends on what an alert costs and what a missed delay costs.
Quick check: test your understanding
Try it yourself: If alerts are cheap but missed failures are very costly, which direction might you explore when adjusting the threshold?
Check the reasoning
Explore lower thresholds to improve sensitivity, while measuring the extra false alarms and confirming the tradeoff on validation data.
Is the default threshold of 0.5 always optimal?
No. The decision costs and required performance determine an appropriate threshold.
How would you solve the practice case?
Explore lower thresholds to improve sensitivity, while measuring the extra false alarms and confirming the tradeoff on validation data.
What does the worked example show?
Two deliveries receive estimated late-arrival probabilities of 0.35 and 0.70. At a threshold of 0.50, only the second triggers an alert. At 0.30, both trigger alerts. Neither threshold is universally correct; the useful choice depends on what an alert costs and what a missed delay costs.
Further reading
Machine Learning — Tom M. Mitchell.
Original ToolsInVision teaching examples. Editorial approach · Suggest a correction
Accessible referenceLesson 6 transcript225 words · Video transcript · Matches the published narration and captionsOpen transcript
A package is either late or on time, but the evidence before departure is uncertain. Logistic regression models a binary outcome by transforming a linear combination of features into a value between zero and one. That output can support a probability estimate, provided its quality is checked on representative data.
The sigmoid transformation connects the linear score to the bounded output. Training commonly uses a likelihood-based objective equivalent to binary cross-entropy. Despite its name, logistic regression is widely used for classification. It can be a useful, interpretable baseline, especially when the decision boundary is reasonably described by the chosen features and transformations.
A predicted probability does not automatically determine an action. A decision threshold converts it into a class or intervention. Raising the threshold usually reduces positive predictions; lowering it usually increases them. The appropriate setting depends on the costs of missed positives and false alarms. Evaluate discrimination and calibration separately, and choose thresholds with validation data rather than tuning them repeatedly on the final test set.
Two deliveries receive estimated late-arrival probabilities of zero point three five and zero point seven zero. At a threshold of zero point five zero, only the second triggers an alert. At zero point three zero, both trigger alerts. Neither threshold is universally correct; the useful choice depends on what an alert costs and what a missed delay costs.