Classification with logistic regression
Sorting into two groups with a mathematical model: linear score, sigmoid function, probability, decision threshold, straight boundary, reading a coefficient as an odds ratio, and the clouds a line cannot separate.
- 27 cards
- 5 topics
- Free
The outline, topic by topic
Each topic is weighted the way the exam weighs it.
- Concepts
- Questions
- Sort and link
- The numbers
- The curves
A few cards from the deck
Classification: what is it?
Show the answer
A prediction task whose result is a category (pass or fail, spam or not) rather than a quantity.
Predicting a mark out of 20 is a regression; predicting “admitted” or “rejected” is a classification. The choice of model depends on it.
A bank wants to predict whether a customer will repay a loan (yes or no) from income and age. Which model fits?
- A logistic regression
- A multiple linear regression
- A degree-2 polynomial regression
- A linear programme
Show the answer
A logistic regression
The answer is a two-outcome category: this is a binary classification. A linear regression, even a polynomial one, predicts a quantity and would give values outside 0 and 1 that cannot be read as probabilities.
Logistic regression first computes a linear …, then turns it into a … with the sigmoid.
Show the answer
Logistic regression first computes a linear score, then turns it into a probability with the sigmoid.
The score can be any real number; only the sigmoid guarantees a result between 0 and 1 that can be read as a probability.