Logistic Regression

Logistic regression is a linear model for classification that estimates the probability an example belongs to a class, passing a weighted sum of features through a logistic function to produce a value between 0 and 1. It is a foundational, interpretable baseline classifier.

What is logistic regression?

Despite the name, logistic regression is a classification method, not a regression one. It learns a weight for each input feature, sums them, and passes that sum through the logistic (sigmoid) function to get a probability, which it thresholds to decide a class. It is binary by default and extends to multiple classes through the softmax function. It is fast, interpretable, and a strong baseline. In visual AI it is rarely applied to raw pixels, instead it is the linear classifier fitted on top of learned features or embeddings, and the softmax head of a neural network classifier is exactly multinomial logistic regression.

Key takeaways

  • A linear classifier that outputs class probabilities through the logistic function.
  • Named "regression" but used for classification, binary by default and multiclass via softmax.
  • In visual AI it is the linear head on top of embeddings and a fast, interpretable baseline.

How it works

  • Take a weighted sum of the input features, then apply the logistic or sigmoid function to get a probability.
  • Train by maximizing likelihood, equivalently minimizing log loss or cross-entropy.
  • For more than two classes, use softmax, which is multinomial logistic regression.

Logistic regression vs related models

Definitions for logistic regression, linear regression, and softmax classifier
Definitions for logistic regression, linear regression, and softmax classifier
ModelWhat it isNote
Logisitic regressionLinear classifier with probability outputInterpretable baseline
Linear regressionPredicts a continuous valueRegression, not classification
Softmax classifierMulticlass logistic regressionThe standard neural-net classification head

Why it matters

Logistic regression is more present in modern visual AI than it looks. Information-gain insight: the final layer of most image classifiers is exactly multinomial logistic regression on top of learned features, so the deep network does the representation learning and logistic regression makes the actual class decision. That is also why "linear probing," fitting a logistic regression on frozen embeddings, is the standard quick test of how good a representation is. If a simple linear model can separate your classes from the embeddings, the features are strong, and if it cannot, more classifier complexity will not save you.

Frequently asked questions

Is logistic regression classification or regression?

Classification. The name is historical, but it predicts class probabilities.

What is the logistic function?

The sigmoid curve that maps any real number to a value between 0 and 1, used to turn a weighted sum into a probability.

Where is logistic regression used in visual AI?

As the softmax classification head of neural networks, as a linear probe on embeddings, and as a fast baseline.

Related terms

Learn more

See how models are scored and compared on the model evaluation page.
Last updated July 1, 2026

Building visual or physical AI?

Let's talk.