In decision theory, both a scoring rule as well as a scoring function provide an ex post summary measure for the evaluation of the quality of a prediction or forecast. They assign a numeric score to a single prediction given the actual outcome. Depending on the sign convention, this score can be interpreted as a loss or a reward for the forecaster. Scoring rules assess probabilistic predictions or forecasts, i.e. predictions of the whole probability distribution of the outcome. On the other hand, scoring functions assess point predictions, i.e. predictions of a property or functional of the probability distribution of the outcome. Examples of such a property are the expectation and the median.
Scoring rules answer the question "how good is a predicted probability distribution given the observation of the actual outcome?" Scoring rules that are (strictly) proper are proven to have the lowest expected score if the predicted distribution equals the underlying distribution of the target variable. Although this might differ for individual observations, this should result in a minimization of the expected score if the "correct" distributions are predicted.
In the same way, scoring functions answer the question "how good is a point prediction given the observation of the actual outcome?". Scoring functions that are (strictly) consistent (for the functional ) are proven to have the lowest expected score if the point prediction equals (or is among) the true functional of the underlying distribution of the target variable.
Scoring rules and scoring functions are often used as "cost functions" or "loss functions" of forecasting models. If a sample of forecasts and observations of the outcome is collected, they can be evaluated as the empirical mean of the given sample, often also called the "score". Scores of predictions of different models or forecasters can then be compared to conclude which model or forecaster is best.
For example, consider a probabilistic model that predicts (based on an input ) a gaussian distribution with mean and standard deviation . A common interpretation of probabilistic models is that they aim to quantify their own predictive uncertainty. In this example, an observed target variable is then held compared to the predicted distribution and assigned a score . When a probabilistic model is trained on a scoring rule, it should "teach" the model to predict when its uncertainty is low, and when its uncertainty is high, and it should result in calibrated predictions, while minimizing the predictive uncertainty.
Although the example given concerns the probabilistic forecasting of a real valued target variable, a variety of different scoring rules have been designed with different target variables in mind. Scoring rules exist for binary and categorical probabilistic classification, as well as for univariate and multivariate probabilistic regression.
Definitions Consider a sample space or observation domain, , which comprises the potential outcomes of a future observation; a σ-algebra of subsets of and a convex class of probability measures on . A function defined on and taking values in the extended real line, , is -quasi-integrable if it is measurable with respect to and is quasi-integrable with respect to all .
A (statistical) functional is a potentially set-valued mapping from the class of probability distributions to a Euclidean space, i.e. with .
Probabilistic forecast A probabilistic forecast is any probability measure , i.e. a distribution of potential future observations.
Point forecast A point forecast for the functional is any value .
Scoring rule A scoring rule is any extended real-valued function such that is -quasi-integrable for all . represents the loss or penalty when the forecast is issued and the observation materializes.
Scoring function A scoring function is any real-valued function where represents the loss or penalty when the point forecast is issued and the observation materializes.
Orientation / Sign convention Scoring rules and scoring functions are negatively (positively) oriented if smaller (larger) values mean better. Changing the convention can be accomplished by multiplying the score by . Here we adhere to the negative orientation, hence the association with "loss".
Expected score We write for the expected score of a probabilistic prediction with respect to the underlying distribution :
Similar, the expected score of a point prediction with resprect to the underlying distribution :
Sample average score A way to estimate the expected score is by means of the sample average score. Given a sample of prediction-observation pairs e.g. for probabilistic predictions and observations , , for point predictions , the average score is calculated as
for scoring rules:
for scoring functions:
By invoking some law of large numbers argument, the sample average scores are consistent estimators of the expectation.
Properties
Propriety and consistency Strictly proper scoring rules and strictly consistent scoring functions encourage honest forecasts by maximization of the expected reward: If a forecaster is given a reward of if realizes (e.g. ), then the highest expected reward (lowest score) is obtained by reporting the true probability distribution.
Proper scoring rules A scoring rule is proper relative to if (assuming negative orientation) its expected score is minimized when the forecasted distribution matches the distribution of the observation.
for all .
It is strictly proper if the above equation holds with equality if and only if .
Consistent scoring functions A scoring function is consistent for the functional relative to the class if
for all , all and all .
It is strictly consistent if it is consistent and equality in the above equation implies that .
Affine transformation After an affine transformation a strictly proper scoring rule remains strictly proper, a strictly consistent scoring function (for some functional ) remains strictly consistent. That is, if is a strictly proper scoring rule then with is also a strictly proper scoring rule, though if then the optimization sense of the scoring rule switches between maximization and minimization. For scoring functions the same statement applies with the obvious changes.
Locality A proper scoring rule is said to be local if its estimate for the probability of a specific event depends only on the probability of that event. This statement is vague in most descriptions but we can, in most cases, think of this as the optimal solution of the scoring problem "at a specific event" is invariant to all changes in the observation distribution that leave the probability of that event unchanged. All binary scores are local because the probability assigned to the event that did not occur is determined so there is no degree of flexibility to vary over.
Affine functions of the logarithmic scoring rule are the only strictly proper local scoring rules on a finite set that is not binary.
Decomposition
The expectation value of a proper scoring rule can be decomposed into the sum of three components, called uncertainty, reliability, and resolution, which characterize different attributes of probabilistic forecasts:
If a score is proper and negatively oriented (such as the Brier Score), all three terms are positive definite. The uncertainty component is equal to the expected score of the forecast which constantly predicts the average event frequency. The reliability component penalizes poorly calibrated forecasts, in which the predicted probabilities do not coincide with the event frequencies.
The equations for the individual components depend on the particular scoring rule. For the Brier Score, they are given by
where is the average probability of occurrence of the binary event , and is the conditional event probability, given , i.e.
Examples of proper scoring rules There are an infinite number of scoring rules, including entire parameterized families of strictly proper scoring rules. The ones shown below are simply popular examples.
Categorical variables For a categorical response variable with mutually exclusive events, , a probabilistic forecaster or algorithm will return a probability vector with probabilities for each of the outcomes.
If materializes, one often abbreviates the score as .
Logarithmic score
The logarithmic scoring rule is a strictly proper and local scoring rule. This is also the negative of Shannon entropy, which is commonly used as a scoring criterion in Bayesian inference. This scoring rule has strong foundations in information theory.
Here, the score is calculated as the logarithm of the probability estimate for the actual outcome. That is, a prediction of 80% that correctly proved true would receive a score of . This same prediction also assigns 20% likelihood to the opposite case, and so if the prediction proves false, it would receive a score based on the 20%: . The goal of a forecaster is to maximize the score and for the score to be as large as possible, and −0.22 is indeed larger than −1.6.
If one treats the truth or falsity of the prediction as a variable with value 1 or 0 respectively, and the expressed probability as , then one can write the logarithmic scoring rule as . Note that any logarithmic base may be used, since strictly proper scoring rules remain strictly proper under linear transformation. That is:
is strictly proper for all .
Brier/Quadratic score The quadratic scoring rule is a strictly proper scoring rule
where is the probability assigned to the correct answer .
The Brier score, originally proposed by Glenn W. Brier in 1950, can be obtained by an affine transform from the quadratic scoring rule.
Where when the th event is correct and otherwise. It can be thought of as a generalization of mean squared error to probabilistic forecasts.
An important difference between these two rules is that a forecaster should strive to maximize the quadratic score yet minimize the Brier score . This is due to a negative sign in the linear transformation between them.
Spherical score The spherical scoring rule is also a strictly proper scoring rule
Also its generalization with is strictly proper
Ranked Probability Score The ranked probability score (RPS) is a strictly proper scoring rule, that can be expressed as:
Where when the th event is correct and otherwise, and is the number of classes. Other than other scoring rules, the ranked probability score considers the distance between classes, i.e. classes 1 and 2 are considered closer than classes 1 and 3. The score assigns better scores to probabilistic forecasts with high probabilities assigned to classes close to the correct class. For example, when considering probabilistic forecasts and , we find that , while , despite both probabilistic forecasts assigning identical probability to the correct class.
Comparison of categorical strictly proper scoring rules Shown below on the left is a graphical comparison of the Logarithmic, Quadratic, and Spherical scoring rules for a binary classification problem. The x-axis indicates the reported probability for the event that actually occurred.
Each of the scores have different magnitudes and locations. The magnitude differences are not relevant however as scores remain proper under affine transformation. Therefore, to compare different scores it is necessary to move them to a common scale. A reasonable choice of normalization is shown in the picture where all scores intersect the points (0.5,0) and (1,1). This ensures that they yield 0 for a uniform distribution (two probabilities of 0.5 each), reflecting no cost or reward for reporting what is often the baseline distribution. All normalized scores below also yield 1 when the true class is assigned a probability of 1.
Univariate continuous variables