{
  "aliases": null,
  "backlinks": [
    {
      "field": "defines",
      "target": "AYTEC1KET8"
    },
    {
      "field": "uses",
      "target": "GR4FN6XNWP"
    }
  ],
  "body": "\n## Summary\n\nLogistic regression models the probability of a binary outcome as the logistic function of a linear combination of regressors.\nEquivalently, the log-odds of the outcome is linear in the regressors.\nSo each coefficient is the change in log-odds for a unit change of its regressor.\nIt is the [[generalized linear model|K6C48KMRKC]] for [[Bernoulli|0386Y0Z7Y7]] responses with the canonical logit link, and it is fitted by [[maximum likelihood|0FREPFKNS7]].\nIt is one of the most used models in medicine, the social sciences and machine learning, where it is a basic linear classifier.\n\n## Explanations\n\n### L1 human\n\nMany questions have a yes/no answer: does a patient recover, does a customer buy.\nA straight line can predict values below $0$ or above $1$, which make no sense as probabilities.\nLogistic regression bends the line into an S-shaped curve that always stays between $0$ and $1$.\nIf the model says $\\log(p / (1 - p)) = -2 + 0.5 x$, then at $x = 4$ the odds are $e^0 = 1$, so the probability is $1/2$.\nEach extra unit of $x$ multiplies the odds by $e^{0.5} \\approx 1.65$.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "kind": "concept",
    "msc": [
      "62J12"
    ],
    "name": "Logistic regression",
    "same_as": {
      "wikidata": "Q1132755",
      "wikipedia": "Logistic regression"
    },
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Logistic_regression"
      }
    ],
    "specializes": [
      "K6C48KMRKC"
    ],
    "tag": "JN1PJ5AJJS"
  },
  "kind": "concept",
  "link": "https://tamnd.github.io/math2/node/JN1PJ5AJJS/",
  "links": [
    {
      "field": "specializes",
      "target": "K6C48KMRKC"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/JN1PJ5AJJS.md",
  "msc": [
    "62J12"
  ],
  "name": "Logistic regression",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/JN1/JN1PJ5AJJS.md",
  "status": null,
  "tag": "JN1PJ5AJJS",
  "uri": "m2://JN1PJ5AJJS",
  "url": "https://tamnd.github.io/math2/wiki/logistic-regression/",
  "writing": {
    "tag": "JN1PJ5AJJS",
    "kind": "concept",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
