Loss function (source code)

= Loss function

A loss function assigns a numerical penalty to a prediction and its observed outcome. Its <expected value> is the population risk optimized by a statistical learning procedure.