Code and data on a screen, representing logistic regression.

A workhorse algorithm for yes-or-no predictions.

What logistic regression is

Logistic regression is a fundamental machine learning algorithm used to predict the probability of a yes-or-no outcome. Will this email be spam? Will this customer cancel? Is this tumor benign? It takes in one or more input features and produces a probability between zero and one, which is then used to decide between two categories. Despite its name, it is a classification method, not a tool for predicting continuous numbers.

Why the confusing name

The name trips people up because regression usually means predicting a continuous value. Logistic regression borrows the mathematical machinery of linear regression but adds a crucial twist, so its output is a probability rather than an unbounded number. It keeps regression in the name for historical and technical reasons, but in practice it is used to classify things into one of two groups, which is why it can seem misnamed at first.

The sigmoid function

The key ingredient is the sigmoid, or logistic, function, an S-shaped curve that squeezes any number into a value between zero and one. The algorithm first combines the inputs much like linear regression, producing a single score, then passes that score through the sigmoid to turn it into a probability. A result near one means the model is confident the answer is yes, while near zero means it is confident the answer is no.

How it learns

Logistic regression learns from labeled examples by adjusting the weight it gives each input feature. During training, it compares its predicted probabilities against the known correct answers and tweaks the weights to reduce its errors, typically using an optimization method like gradient descent. Over many passes through the data, it settles on the weights that best separate the two categories, and those weights also reveal which features matter most.

Where it is used

Logistic regression is everywhere in practice: spam detection, credit scoring, medical diagnosis, predicting customer churn, and judging whether an online ad will be clicked. It is popular because it is fast, works with modest data, and is interpretable, since you can see how each feature pushes the prediction toward yes or no. It is often the first model data scientists try before reaching for anything more complex.

The bottom line

Logistic regression predicts the probability of a two-way outcome by combining inputs and passing the result through the sigmoid function, which keeps the answer between zero and one. It is a classifier despite its name, and its speed, simplicity, and interpretability keep it a staple of machine learning. Understanding it is one of the best first steps into how predictive models actually make decisions.

See also: What is naive Bayes? Explained, What is gradient descent? Explained.

Sources

Published date reflects the original event date (2026-10-23). This article is original Skillo editorial written from the sources above; facts were verified in September 2026.

Skillo Staff

Skillo Staff

All stories by: Skillo Staff

Leave a Reply