A logistic regression model gives , with , and . (a) What is the decision boundary for threshold 0.5? (b) What is it for threshold 0.8? (c) How is the point classified under each threshold?
Supervised learning, Logistic regression
Level L2 Elementary. Length Short. Nature Mat Mathematical.
What's being asked
Whether you know the boundary is where the score equals a constant, so it is a straight line, and that changing the threshold moves the line parallel to itself.
Key idea
Because is increasing, exactly when . So the boundary for threshold is the line . For the right side is 0; for it is .
Steps
- Invert the sigmoid. Solving gives , so . This value is called the logit of .
- (a) For the logit is 0, so the boundary is , i.e. . Predict class 1 where , which is the region below this line.
- (b) For the logit is , so the boundary is , i.e. . The slope is the same, so the line is parallel. It sits lower, so the class-1 region shrinks, as you would expect from a stricter threshold.
- (c) At the score is , and . This is above 0.5 but below 0.8, so the point is class 1 under threshold 0.5 and class 0 under threshold 0.8.
Common mistakes
- Setting . The threshold is on the probability, so convert it to a score with the logit first.
- Calling the boundary curved because the sigmoid is curved. The boundary is still a straight line in .
How long your answer should be
4–5 lines of working.
Last checked on 4 December 2026.
Read this
Previous in Supervised learning: Why does a random forest have lower variance than a single deep decision tree?
Next in Supervised learning: A spam filter uses two yes/no features: = “contains the word offer” and = “contains a link”. The training set has 10 emails: 4 spam and 6 ham (not spam). Among spam, in 3 emails and in 3. Among ham, in 1 email and in 2. Using Bernoulli naive Bayes, how is a new email with classified (a) with maximum-likelihood estimates and (b) with Laplace (add-one) smoothing, and what is the posterior in each case?