Why is logistic regression called regression when it is actually a classifier? What exactly does it regress, and where does the classification happen?

The Problem: A radar-perception team fits logistic regression on 10,000 labeled detections (pedestrian vs clutter) and gets 0.73 for detection #4182, which feeds both an emergency-braking module that needs a yes/no decision and a fusion module that needs a probability. Engineer A says the model is a classifier and 0.73 is just a score, engineer B says it is a regression, and nobody can say what the 0.73 actually is.
Answer
The name is accurate, because logistic regression never outputs a class on its own. It fits a linear model to the log-odds of the positive class and maps that unbounded score through the sigmoid to a probability . For a 0/1 label that probability equals the conditional mean
, and estimating a conditional mean from features is exactly what regression means in statistics. Formally it is a generalized linear model with a Bernoulli outcome and a logit link, the same family as least squares and Poisson regression. It becomes a classifier only when a separate decision threshold
is applied to the probability, and that threshold comes from error costs rather than from the fit.
(1) Regression Means Conditional Mean: Since Galton, regression is the estimation of from predictors. For a binary target that mean is a probability, so predicting it is regression even though the label itself is discrete.
(2) The Linear Part Lives In Log-Odds: A probability is bounded in , but the logit
ranges over the whole real line, so a linear predictor is legitimate there. The sigmoid is just the inverse link that maps it back.
(3) A Generalized Linear Model: Bernoulli family plus the canonical logit link gives logistic regression. Swap the link for the normal CDF and you get probit regression, swap the family for Poisson and you get count regression.
(4) Classification Is A Separate Decision Rule: The label comes from , which is the hyperplane
. Changing
moves the boundary without refitting a single weight.
(5) The Fit Is Literally Regression: Maximum likelihood is solved by iteratively reweighted least squares, a sequence of weighted linear regressions on a working response. Coefficients read as log odds ratios, with standard errors and tests like any regression.
Mathematical Formulation:
Where:
is the predicted probability that the label
equals 1 for feature vector
. For a Bernoulli label it is also the conditional mean
.
and
are the weights and intercept,
is the linear predictor (the log-odds), and
is the logistic sigmoid, the inverse of the logit link.
is the Bernoulli negative log-likelihood (binary cross-entropy),
is the per-example log-likelihood,
indexes training examples,
are labels, and
.
is the predicted class,
is the indicator function, and
is the decision threshold, which is not a fitted parameter.
is the expected-cost-minimizing threshold when a false positive costs
and a false negative costs
. It is valid only if
is calibrated.
Notice that nothing in the first five lines mentions a class. The fit minimizes the Bernoulli negative log-likelihood, so the estimated is a regression estimate of a conditional mean, just with a bounded, S-shaped response. Classification enters only in the threshold rule. Because the logit is monotone,
is the same as
, which is why the decision boundary is a hyperplane and why moving
slides it without a refit.

Figure 1: One fitted model, , seen three ways. (a) In log-odds space the fit is a straight line through binned empirical log-odds, which is the regression. (b) The sigmoid maps it to
, while least squares on the same 0/1 labels leaves
. (c) A classifier appears only once a threshold is chosen:
puts the boundary at
and
moves it to
with no refit.
Worked Example:
The fitted model is , with
the micro-Doppler spread in m/s. Detection #4182 has
, so the regression output is the log-odds
. The odds are
, which gives
. The coefficient says each extra 1 m/s multiplies the odds by
, a statement about a regression slope, not about a class. Now build two classifiers from this one fit. At the default
the boundary sits where the log-odds hit 0, at
, so #4182 is labeled a pedestrian. If a missed pedestrian costs nine false brakes, then
, the boundary log-odds drop to
, and the boundary moves to
without touching
or
.
The name also explains what logistic regression is not. Running ordinary least squares on 0/1 labels, the linear probability model, regresses the same conditional mean, but a straight line in probability space predicts values above 1 or below 0 at the edges of the feature range. Its errors also have variance that changes with
. The logit link fixes both by putting the linear structure where the target is unbounded. A linear SVM sits on the other side: it learns only a separating hyperplane, so it is a classifier with no regression target at all.
| Property | Logistic regression | Linear regression | Linear SVM |
|---|---|---|---|
| What it models | E[Y | x] for a binary Y, linear in the log-odds | E[Y | x] for a real-valued Y, linear in Y itself | Only a separating hyperplane, no conditional mean |
| Raw output | A probability in (0, 1) | Any real number | A signed margin score |
| Loss | Cross-entropy (Bernoulli negative log-likelihood) | Squared error (Gaussian negative log-likelihood) | Hinge loss |
| Fitting | IRLS or gradient descent, no closed form | Closed-form normal equations | Quadratic program or SGD |
| Where the class comes from | An external threshold t chosen from error costs | Not a classifier unless you threshold it | Built into the loss at margin zero |
| Probability without extra step | Yes, if the model is well specified | No, predictions can leave [0, 1] | No, needs Platt scaling on held-out data |
Leave a Reply