Logistic RegressionSummary
One page to revise from — the ideas first, then every formula you need.
- Classification predicts a group, not a number. Binary classification picks between two groups, written 1 and 0.
- A straight line cannot give chances: it escapes below 0 and above 1. Logistic regression squashes the line with the sigmoid, so every output is a chance between 0 and 1.
- A threshold turns a chance into a decision; the feature value where the chance equals the threshold is the decision boundary. Moving the threshold trades one kind of mistake for another.
- Log-loss charges of the chance given to what really happened: right and sure costs almost nothing, wrong and sure costs a lot.
- The best curve is found by gradient descent on the log-loss — or, equivalently, by maximum likelihood.
- Odds are . One more unit of a feature multiplies the odds by .
The model
Odds
Log-loss