AI GLOSSARY · AI CONCEPTS

Logistic regression

Markdown version

Definition

Logistic regression models probabilities for categorical outcomes. Binary logistic regression applies a sigmoid to a weighted feature sum; multinomial variants handle more than two classes. A decision rule converts probabilities into class predictions.

Also called: logistic regression machine learning, logistic regression classifier, logit regression, logistic model.

In plain language

For a binary task such as spam detection, logistic regression estimates a probability between zero and one. It combines feature values and applies a sigmoid; a chosen threshold turns that probability into a yes-or-no prediction. More than two classes require an appropriate multiclass formulation. The boundary is linear in the supplied features; transformations can make it nonlinear in the original inputs. A simple model can still overfit.

Technical definition

Binary logistic regression models the log-odds of one class as an affine function of features. Applying a sigmoid yields its probability estimate. Multinomial logistic regression instead models several class probabilities, commonly with softmax. Log-loss fitting can include regularization; scikit-learn applies regularization by default. Probability estimates, decision thresholds and class predictions are distinct outputs or choices.

Worked examples in this catalogue

Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.

  1. Skill by Skill Almanac · Illustrative, not executed

    split-leakage-check 53/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What you see
    A check of train, validation and test files for duplicates, shared groups, time and label leakage, printed as JSON.
    Why it exercises the concept
    A logistic regression baseline is only meaningful if the test file is clean. The catalogue has no training skills; this is the nearest check that applies to any classifier.
  2. Skill by Skill Almanac · Illustrative, not executed

    data-analysis-eda 56/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What you see
    A fixed exploratory-analysis procedure and CSV profiler that keeps findings descriptive, evidenced and caveated.
    Why it exercises the concept
    Profiling the columns and the label balance comes before fitting a classifier. This skill does the profiling; it does not fit a model.
  3. Skill by Skill Almanac · Illustrative, not executed

    sample-size-calculator 41/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What you see
    Computes the minimum number of subjects per group for a planned comparison of two proportions, two means, or one mean, using the normal approximation.
    Why it exercises the concept
    A contrast case from classical statistics: it plans a comparison of proportions, while logistic regression models a probability from features. Both deal with yes-or-no outcomes, but they answer different questions.
  4. Coding tool · Illustrative, not executed

    Claude Code

    What you see
    Claude Code's overview page describes it as an agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools.
    Why it exercises the concept
    A coding agent can fit scikit-learn's LogisticRegression on a small table and print the predicted probabilities, so you can see the cutoff decision for yourself.

How it shows up when you use agents

Logistic regression is a classic modelling method, and can appear when you ask an agent to build a quick classifier on a table, for example with scikit-learn, and when someone proposes it as a baseline before a heavier model. A binary fit can return a positive-class probability per row and a coefficient per supplied feature; multiclass models have additional class-specific parameters.

What breaks when it is misunderstood. People treat the 0.5 cutoff as fixed, although you can move it to suit the cost of each kind of mistake. They also forget that scikit-learn applies regularization by default, which changes the coefficients compared with a textbook fit. And they read a high score as proof, when a leaky split can inflate it.

Next actions. Profile the data, fit on training rows, and evaluate on held-out rows after checking the split with split-leakage-check. It is one kind of classification and a form of supervised learning.

Worked example (illustrative)

Choose a binary model whose logit for one row is ln(3). The sigmoid gives 3 / (1 + 3) = 0.75. With a positive-class threshold of 0.7, that row receives the positive label. A threshold of 0.8 would give the negative label without changing the probability estimate. These calculated toy values demonstrate a decision rule, not calibration or real classifier accuracy.

Common confusions

  • Logistic regression versus linear regression. Linear regression predicts a number. Logistic regression predicts the probability of a category. scikit-learn notes that despite the name it is a model for classification.
  • Probability versus decision. For binary prediction, a threshold turns a probability into a class. Multiclass prediction needs an appropriate rule, such as selecting the largest class probability.
  • Binary versus multinomial. IBM lists binary, multinomial and ordinal types, depending on the number and order of outcomes.
  • Myth. Logistic regression cannot overfit because it is simple. IBM notes the risk rises with many predictors and a small sample. Regularization is one way to limit it. See Regularization.

Terms that mention Logistic regression

4 terms mention this one

More in AI concepts

Next steps

  1. split-leakage-check A skill that exercises it.
  2. Classification Related term.
  3. Linear regression Related term.
  4. All glossary terms A to Z and by family.

Sources

Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-24. Wikipedia is never the only source.

Review record

Last verified

Drafted by Claude (original draft) and Codex (automated revisions); sources and example targets checked by Independent automated source review (OpenAI Codex); not human peer review on 2026-11-24. Last verified .

Change log (5)
  • : Independent automated factual/example review completed. Cached US query estimate aligned to receipt; no traffic promise. Final technical gate recorded separately; publication disabled.
  • : First version.
  • : Verifier pass: applied wording corrections from the verification list.
  • : Foundation scope and counterexample corrections; independent exact-version review pending.
  • : Automated review completed; approved for the staged public release. Search indexing is controlled by the release configuration.