Skip to content
IT glossary
Data and MLUpdated December 3, 2026

Logistic regression

Логистическая регрессия

A model that uses an object's features to estimate the chance of an event, such as a customer renewing a subscription. For a yes-or-no prediction, you compare that probability with a threshold.

What the model predicts

Despite its name, logistic regression is most often used for classification. In the binary case, it learns from examples labeled 0 or 1 and estimates how likely a new example is to belong to class 1. A support team might use it to estimate whether a ticket will miss its response deadline based on factors such as queue length and ticket priority.

From features to a probability

The model starts with a score, z = b + w₁x₁ + … + wₙxₙ. Each xᵢ is a feature, each wᵢ is its learned weight, and b is the intercept. The sigmoid converts that score to p = 1 / (1 + exp(-z)). A score of zero gives a probability of 0.5, and higher scores give higher probabilities.

Training typically minimizes binary cross-entropy, also called log loss. Confident mistakes cost more: if a ticket really did miss its deadline, assigning that event a probability of 0.01 incurs a much larger loss than assigning it 0.4. An L2 penalty is often added to discourage large coefficients and help the model generalize.

What the coefficients mean

A weight describes a change in log-odds, not a change in probability. Odds are p / (1 - p), so increasing one feature by one unit multiplies the odds by exp(wᵢ) when all other features stay fixed. If a feature's weight is about 0.69, one extra unit roughly doubles the odds. That could move the probability from 0.5 to about 0.67, not to 1.0. The coefficient describes an association in the model, not necessarily a causal effect.

Example: deciding when to flag a ticket

Suppose the model estimates a 0.35 probability that a ticket will miss its deadline. A cutoff of 0.5 leaves it unflagged; a cutoff of 0.3 flags it for review. The probability is the same either way. Pick the cutoff on validation data based on how costly missed deadlines are and how many extra tickets the team can review.

Where it fits and what interviews test

Logistic regression is a useful baseline for problems like churn prediction and text classification, including text represented by sparse word counts. Its decision boundary is linear in the features supplied to the model, even though the sigmoid is nonlinear. If the relationship depends on combinations of features, try adding interaction terms or comparing against a tree-based model.

Interviewers often ask you to separate model fitting from threshold selection. Log loss evaluates the probability predictions, while precision and recall describe the class decisions at a particular cutoff. Accuracy can hide failure on rare events: if only 1% of tickets miss their deadline, predicting “on time” for every ticket is 99% accurate and catches none of the misses.