{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $\\Theta$ be a set of states of nature, for example the parameter set of a [[parametric model|MSC0MR8VMH]].\nLet $\\mathcal{A}$ be a set of actions.\nA *loss function* is a function $L \\colon \\Theta \\times \\mathcal{A} \\to [0, \\infty)$.\nThe value $L(\\theta, a)$ is the loss incurred by taking the action $a$ when the true state is $\\theta$.\n\n## Remarks\n\nFor estimating a real quantity $g(\\theta)$, the action set is $\\mathcal{A} = \\R$ and standard choices are the following.\nThe *squared error loss* is $L(\\theta, a) = (a - g(\\theta))^2$.\nThe *absolute error loss* is $L(\\theta, a) = \\abs{a - g(\\theta)}$.\nIn a test of $\\theta \\in \\Theta_0$ against $\\theta \\notin \\Theta_0$, with $\\mathcal{A} = \\set{0, 1}$, the *$0$-$1$ loss* is $1$ for a wrong decision and $0$ for a right one.\nSome authors allow real-valued losses that are only bounded below; this changes little in the theory.\n\nExample: $\\Theta = \\mathcal{A} = \\R$ and $L(\\theta, a) = (a - \\theta)^2$.\nIt is a function of the pair $(\\theta, a)$ with values in $[0, \\infty)$, and it is $0$ exactly when $a = \\theta$.\n\nNon-example: $L(\\theta, a) = a - \\theta$ on $\\R \\times \\R$.\nIt takes negative values, so it is not a loss function in the sense above.\nIt would also reward underestimating $\\theta$ without limit.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "3BTG6VVCGZ",
    "kind": "definition",
    "msc": [
      "62C05"
    ],
    "name": "Loss function",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Loss_function"
      }
    ],
    "tag": "RE02MP1H45",
    "uses": [
      "MSC0MR8VMH"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/RE02MP1H45/",
  "links": [
    {
      "field": "defines",
      "target": "3BTG6VVCGZ"
    },
    {
      "field": "uses",
      "target": "MSC0MR8VMH"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/RE02MP1H45.md",
  "msc": [
    "62C05"
  ],
  "name": "Loss function",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/RE0/RE02MP1H45.md",
  "status": null,
  "tag": "RE02MP1H45",
  "uri": "m2://RE02MP1H45",
  "url": "https://tamnd.github.io/math2/wiki/loss-function-definition/",
  "writing": {
    "tag": "RE02MP1H45",
    "kind": "definition",
    "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
      }
    ]
  }
}
