A model scores each student with a number (positive leans towards "will pass", negative towards "will fail"). Why does logistic regression pass through the sigmoid function , and what does the output mean? For example, what does become?
Supervised learning, Logistic regression
Level L1 Beginner. Length Short. Nature Th Theoretical.
What's being asked
Whether you understand that logistic regression turns any score into a probability between 0 and 1, and can read that probability.
Key idea
A score can be any number, from very negative to very positive, but a probability must lie between 0 and 1. The sigmoid squashes every into that range: large negative gives a value near 0, gives exactly 0.5, and large positive gives a value near 1. The output is read as .
Steps
- State the problem. A straight-line score such as can be or , which is not a probability.
- Describe the sigmoid. It is an S-shaped curve. At it gives (a coin toss), it rises towards 1 as grows, and it falls towards 0 as becomes very negative.
- Do the small calculation. For : . Read it as: the model says this student has about an 88% chance of passing.
- Turn the probability into a yes/no answer if needed. Predict "pass" when the probability is above 0.5, which happens exactly when .
Common mistakes
- Calling logistic regression a regression that predicts a number. It is a classifier: its output is a probability for a class.
- Thinking the output is the final class. It is a probability; you choose a threshold (often 0.5) to get a class.
How long your answer should be
4–5 sentences with one calculation.
Read this
Previous in Supervised learning: When we fit a straight line to data points by least squares, what exactly is the line trying to make small?
Next in Supervised learning: What is a decision tree, and how does it use a chain of yes/no questions to decide the class of a new example? Use "go out to play or stay in" as your example?