Loss function: Difference between revisions

Content deleted Content added
Remove incorrect wikilink; decapitalise
(4 intermediate revisions by 4 users not shown)
Line 2:
In [[mathematical optimization]] and [[decision theory]], a '''loss function''' or '''cost function''' (sometimes also called an error function)<ref name="ttf2001">{{cite book|first1=Trevor |last1=Hastie |authorlink1= |first2=Robert |last2=Tibshirani |authorlink2=Robert Tibshirani|first3=Jerome H. |last3=Friedman |authorlink3=Jerome H. Friedman |title=The Elements of Statistical Learning |publisher=Springer |year=2001 |isbn=0-387-95284-5 |page=18 |url=https://web.stanford.edu/~hastie/ElemStatLearn/}}</ref> is a function that maps an [[event (probability theory)|event]] or values of one or more variables onto a [[real number]] intuitively representing some "cost" associated with the event. An [[optimization problem]] seeks to minimize a loss function. An '''objective function''' is either a loss function or its opposite (in specific domains, variously called a [[reward function]], a [[profit function]], a [[utility function]], a [[fitness function]], etc.), in which case it is to be maximized. The loss function could include terms from several levels of the hierarchy.
 
In statistics, typically a loss function is used for [[parameter estimation]], and the event in question is some function of the difference between estimated and true values for an instance of data. The concept, as old as [[Pierre-Simon Laplace|Laplace]], was reintroduced in statistics by [[Abraham Wald]] in the middle of the 20th century.<ref>{{cite book |first=A. |last=Wald |title=Statistical Decision Functions |via=APA Psycnet |publisher=Wiley |year=1950 |url=https://psycnet.apa.org/record/1951-01400-000}}</ref> In the context of [[economics]], for example, this is usually [[economic cost]] or [[Regret (decision theory)|regret]]. In [[Statistical classification|classification]], it is the penalty for an incorrect classification of an example. In [[actuarial science]], it is used in an insurance context to model benefits paid over premiums, particularly since the works of [[Harald Cramér]] in the 1920s.<ref>{{cite book |last=Cramér |first=H. |year=1930 |title=On the mathematical theory of risk |publisher=Centraltryckeriet }}</ref> In [[optimal control]], the loss is the penalty for failing to achieve a desired value. In [[financial risk management]], the function is mapped to a monetary loss.
[[File:Comparison of loss functions.png|thumb|Comparison of common loss functions ([[Mean absolute error|MAE]], [[Symmetric mean absolute percentage error|SMAE]], [[Huber loss]], and Loglog-Coshcosh Lossloss) used for regression]]
 
==Examples==
Line 19:
Many common [[statistic]]s, including [[t-test]]s, [[Regression analysis|regression]] models, [[design of experiments]], and much else, use [[least squares]] methods applied using [[linear regression]] theory, which is based on the quadratic loss function.
 
The quadratic loss function is also used in [[Linear-quadratic regulator|linear-quadratic optimal control problems]]. In these problems, even in the absence of uncertainty, it may not be possible to achieve the desired values of all target variables. Often loss is expressed as a [[quadratic form]] in the deviations of the variables of interest from their desired values; this approach is [[closed-form expression|tractable]] because it results in linear [[first-order condition]]s. In the context of [[stochastic control]], the expected value of the quadratic form is used. The quadratic loss assigns more importance to outliers than to the true data due to its square nature, so alternatives like the [[Huber loss|Huber]], Loglog-Coshcosh and SMAE losses are used when the data has many large outliers.
[[File:Fitting a straight line to a data with outliers.png|thumb|Effect of using different loss functions, when the data has outliers.]]
 
===0-1 loss function===
Line 44:
Among other things, he constructed objective functions to optimally distribute budgets for 16 Westfalian universities<ref name="Tangian2004universityBudgets">{{Cite journal |last=Tangian |first=Andranik |year=2004 |title= Redistribution of university budgets with respect to the status quo |journal= European Journal of Operational Research |volume=157 |issue=2 |pages=409–428|doi = 10.1016/S0377-2217(03)00271-6 }}</ref>
and the European subsidies for equalizing unemployment rates among 271 German regions.<ref name="Tangian2008RegionalEnemployment">{{Cite journal|last=Tangian |first=Andranik |year=2008
|title= Multi-criteria optimization of regional employment policy: A simulation analysis for Germany |journal= Review of Urban and Regional Development |volume=20 |issue=2|pages=103–122 |url= https://onlinelibrary.wiley.com/doi/10.1111/j.1467-940X.2008.00144.x |doi = 10.1111/j.1467-940X.2008.00144.x |url-access=subscription }}</ref>
 
==Expected loss==