Regression · Machine Learning
LINE — Linear regression predicts a NUMBER. Logistic predicts a CATEGORY.
Linear predicts a number. Logistic predicts a category. Despite the name.
L
Linear Regression — predicts a continuous number
Uses the formula y = mx + b, minimizing squared errors between predictions and actual values, to predict continuous outcomes like price or temperature.
Example: predicting a house's sale price as a number, such as $342,500, based on square footage and location.
O
Logistic Regression — predicts a category, despite its name
Despite being named "regression," logistic regression is used for classification. It uses the sigmoid function to output a probability between 0 and 1.
Example: outputting a 0.83 probability that an email is spam — a probability, not a raw continuous quantity like price.
G
The Decision Boundary — where classification actually happens
The output probability is compared against a threshold, typically 0.5. Above the threshold is classified as the positive class; below is the negative class.
Example: a predicted probability of 0.83 (above 0.5) gets classified as "spam"; a predicted probability of 0.2 gets classified as "not spam."
1
An exam question asks you to predict tomorrow's exact temperature in degrees.
2
Ask: is the target a continuous number or a category? A continuous number — any value along a range.
3
That points you to Linear Regression, not Logistic Regression, despite Logistic being the one with "regression" also in its name.
4
Contrast: if the question instead asked you to predict whether tomorrow will be "hot" or "cold" (two categories), that would flip the correct choice to Logistic Regression.

This naming trap appears on virtually every ML exam. The test almost always describes a target variable and asks which regression type applies. The rule never changes: continuous numeric output → Linear Regression; category/class output (even if it's phrased as a probability) → Logistic Regression, regardless of the word "regression" appearing in both names.

The single most common trap, baked right into the mnemonic: assuming "logistic regression" must predict a number because it has "regression" in the name. It does not — it's fundamentally a classification algorithm. Watch for exam questions that specifically exploit this naming confusion.

1. What kind of output does Linear Regression predict?
A continuous number, such as a price or temperature.
Tap to reveal / hide
2. What kind of output does Logistic Regression predict, despite its name?
A category — it's a classification algorithm, not a number predictor.
Tap to reveal / hide
3. What function does Logistic Regression use to output a probability between 0 and 1?
The sigmoid function.
Tap to reveal / hide
4. What is the standard decision boundary threshold in Logistic Regression?
0.5 — probabilities above 0.5 are classified as positive, below as negative.
Tap to reveal / hide
5. Which algorithm would you use to predict a continuous house price?
Linear Regression, since the target is a continuous number, not a category.
Tap to reveal / hide