What Is Logistic Regression? A Plain-Language Explanation

Updated · By Viviai

Logistic regression is a supervised classification algorithm that predicts the probability of a category, often a yes-or-no outcome, by passing a linear combination of inputs through a sigmoid function that returns a value between 0 and 1.

The simple analogy

Imagine a scoring system that adds up the facts about an application and then converts the score into a percentage chance of approval. A threshold, commonly 0.5, turns that probability into a clear yes or no.

Why the name can confuse

Despite the word "regression," logistic regression is used for classification, not for predicting a continuous number. The name comes from the logistic function at its center.

The role of the sigmoid function

The sigmoid takes any number, positive or negative, and maps it to a value between 0 and 1, which can be read as a probability. Values above the chosen threshold are assigned to one class, and the rest to the other.

Common types

Type Number of outcomes Example
Binary logistic regression Two Spam or not spam
Multinomial logistic regression Three or more Product category A, B, or C

Where it is commonly used

Logistic regression is used for fraud detection, loan approval, churn prediction, medical screening, and other problems where the answer is a category with an estimated probability.

Honest caveats

The model assumes a relatively clear linear boundary between classes and can struggle when the relationship is strongly nonlinear. Self-reported CEFR-style confidence aside, the predicted probability should be checked against real outcomes rather than treated as exact.

FAQ

Is logistic regression classification or regression?

It is a classification algorithm, even though its name includes the word regression.

What does the sigmoid function do?

It converts an input score into a probability between 0 and 1.

What is a decision threshold?

A cutoff, often 0.5, that converts a predicted probability into a class label.

Can it handle more than two categories?

Yes, a multinomial version can handle three or more categories.

Key takeaways

Continue with what is linear regression and what is a confusion matrix.

Sources

  1. https://www.ibm.com/think/topics/logistic-regression
  2. http://www.cs.toronto.edu/~guerzhoy/201s20/lec/W04/lec1/predictive.pdf
  3. http://www.shturl.cc/3aad54872a5b918d2779e8238082dc19

Learn by doing

Read a guide, then practice with bite-sized AI lessons you can take offline.

Start learning free