↑ arvau

Wikipedia / Scoring rule

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 of the outcome. On the other hand, scoring functions assess point predictions, i.e. predictions of a property or functional 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) 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.

) a gaussian distribution. 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, which comprises the potential outcomes of a future observation; a σ-algebra of probability measures-quasi-integrable if it is measurable.

to a Euclidean space.

Probabilistic forecast

, i.e. a distribution of potential future observations.

Point forecast

.

Scoring rule

materializes.

Scoring function

materializes.

Orientation / Sign convention

. Here we adhere to the negative orientation, hence the association with "loss".

Expected score

:

:

Sample average score

, the average score is calculated as

  • for scoring rules:

\widehat{E[\mathbf{S}]} = \frac{1}{n}\sum_{i=1}^n \mathbf{S}(F_i, y_i)
  • for scoring functions:

\widehat{E[S]} = \frac{1}{n}\sum_{i=1}^n S(x_i, y_i)

By invoking some law of large numbers argument, the sample average scores are consistent estimators of the expectation.

Properties

Propriety and consistency

), then the highest expected reward (lowest score) is obtained by reporting the true probability distribution.

Proper scoring rules

is proper if (assuming negative orientation) its expected score is minimized when the forecasted distribution matches the distribution of the observation.

  1. .

It is strictly proper.

Consistent scoring functions

is consistent if

  1. .

.

Affine transformation

After an affine transformation) remains strictly consistent. 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

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

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

, a probabilistic forecaster or algorithm will return a probability vector outcomes.

.

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:

.

Brier/Quadratic score

The quadratic scoring rule is a strictly proper scoring rule

.

The Brier score, originally proposed by Glenn W. Brier in 1950, can be obtained by an affine transform from the quadratic scoring rule.

otherwise. It can be thought of as a generalization of mean squared error to probabilistic forecasts.

. 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

is strictly proper

Ranked Probability Score

The ranked probability score (RPS) is a strictly proper scoring rule, that can be expressed as:

, 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

The scoring rules listed below aim to evaluate probabilistic predictions when the predicted distributions are univariate continuous probability distributions and have a probability density function. They can be categorized into 3 groups:

  • Scoring rules depending on first and second momentum only

Logarithmic score for continuous variables

The logarithmic score is a local, strictly proper scoring rule. It is defined as

  1. .

The logarithmic score for continuous variables has strong ties to Maximum likelihood estimation and to the Kullback–Leibler divergence.

Quadratic score for continuous variables

The quadratic scoring rule for continuous variables reads

exists.

Continuous ranked probability score

The continuous ranked probability score (CRPS) is a strictly proper scoring rule much used in meteorology. It is closely related to the one-dimensional energy distance, and is defined as

is the Heaviside step function is the observation. For distributions with finite first moment, the continuous ranked probability score can be written as:

. This is the energy form of CRPS and opens the door to estimating the CRPS via Monte Carlo sampling (through approximating the expectation value).

is continuous, the continuous ranked probability score can also be written as

The continuous ranked probability score can be seen as both a continuous extension of the ranked probability score, as well as quantile regression. The continuous ranked probability score over the empirical distribution probability of occurring), is equal to twice the mean quantile loss:

For many popular families of distributions, closed-form expressions for the continuous ranked probability score have been derived. The continuous ranked probability score has been used as a loss function for artificial neural networks, in which weather forecasts are postprocessed to a Gaussian probability distribution.

CRPS was also adapted to survival analysis to cover censored events.

The CRPS can be thought of as the generalization of the mean absolute error (MAE) to probabilistic forecasts, and for a single sample is equivalent to the MAE. Another way to think of it is the Brier/quadaratic score.

CRPS is a special case of the Cramér distance and can be seen as an improvement of Wasserstein distance often used in machine learning. Cramér distance performed better in ordinal regression than KL distance or the Wasserstein metric.

CRPS is widely used for evaluating probabilistic forecasts and compared against other scoring rules, see for example . It also has some critical theoretical limitations: It has been shown that CRPS can produce systematically misleading evaluations by favoring probabilistic forecasts whose medians are close to the observed outcome, regardless of the actual probability assigned to that region, potentially resulting in higher scores for forecasts that allocate negligible (or even zero) probability mass to the true outcome. Furthermore, CRPS is not invariant under smooth transformations of the forecast variable, and its ranking of forecast systems may reverse under such transformations, raising concerns about its consistency for evaluation purposes.

Dawid-Sebastiani score

The Dawid-Sebastiani score (DSS):

Multivariate continuous variables

The scoring rules listed below aim to evaluate probabilistic predictions when the predicted distributions are univariate continuous probability distribution's, and have a probability density function.

Multivariate logarithmic score

The multivariate logarithmic score is similar to the univariate logarithmic score:

. It is a local, strictly proper scoring rule.

Hyvärinen scoring rule

The Hyvärinen scoring function (of a density p) is defined by

denotes the Hessian trace denotes the gradient. This scoring rule can be used to computationally simplify parameter inference and address Bayesian model comparison with arbitrarily-vague priors. It was also used to introduce new information-theoretic quantities beyond the existing information theory.

The Hyvärinen scoring rule is local of order 2 (meaning it locally takes into account derivatives up to second order).

Energy score

The energy score is a multivariate extension of the continuous ranked probability score:

-dimensional Euclidean distance is finite. It has been suggested that the energy score is somewhat ineffective when evaluating the intervariable dependency structure of the forecasted multivariate distribution. Apart from a term that depends only on the distribution of the observation, the energy score is equal to twice the energy distance between the predicted distribution and the empirical distribution of the observation.

Variogram score

The variogram is given by:

'th marginal random variable'th moment is finite for all components, but is never strictly proper. Compared to the energy score, the variogram score is claimed to be more discriminative with respect to the predicted correlation structure.

Conditional continuous ranked probability score

by evaluation of CRPS over a prescribed set of univariate conditional probability distributions of the predicted multivariate distribution:

is ill-defined (i.e. its conditional event has zero likelihood), CRPS scores over this distribution are defined as infinite. Conditional CRPS is strictly proper for distributions with finite first moment, if the chain rule.

Interpretation of proper scoring rules

All proper scoring rules are equal to weighted sums (integral with a non-negative weighting functional) of the losses in a set of simple two-alternative decision problems that use the probabilistic prediction, each such decision problem having a particular combination of associated cost parameters for false positive and false negative decisions. A strictly proper scoring rule corresponds to having a nonzero weighting for all possible decision thresholds. Any given proper scoring rule is equal to the expected losses with respect to a particular probability distribution over the decision thresholds; thus the choice of a scoring rule corresponds to an assumption about the probability distribution of decision problems for which the predicted probabilities will ultimately be employed, with for example the quadratic loss (or Brier) scoring rule corresponding to a uniform probability of the decision threshold being anywhere between zero and one. The classification accuracy score (percent classified correctly), a single-threshold scoring rule which is zero or one depending on whether the predicted probability is on the appropriate side of 0.5, is a proper scoring rule but not a strictly proper scoring rule because it is optimized (in expectation) not only by predicting the true probability but by predicting any probability on the same side of 0.5 as the true probability.

Examples of consistent scoring functions

. The ones shown below are a selection of well known ones.

Expectation

The following scoring functions are strictly consistent for the expected value.

Squared error

Quantiles

-quantile.

Quantile loss / pinball loss

Intervals

quantile.

Interval score

The inverval score is a combination of the two pinball losses for the corresponding quantiles.

"The forecaster is rewarded for narrow prediction intervals, and he or she incurs a penalty, the size of which depends on α, if the observation misses the interval"

Applications

Meteorological weather forecasts

An example of probabilistic forecasting is in meteorology where a weather forecaster may give the probability of rain on the next day. One could note the number of times that a 25% probability was quoted, over a long period, and compare this with the actual proportion of times that rain fell. If the actual percentage was substantially different from the stated probability we say that the forecaster is poorly calibrated. A poorly calibrated forecaster might be encouraged to do better by a bonus system. A bonus system designed around a proper scoring rule will incentivize the forecaster to report probabilities equal to his personal beliefs.

In addition to the simple case of a binary decision, such as assigning probabilities to 'rain' or 'no rain', scoring rules may be used for multiple classes, such as 'rain', 'snow', or 'clear', or continuous responses like the amount of rain per day.

The image shows an example of a scoring rule, the logarithmic scoring rule, as a function of the probability reported for the event that actually occurred. One way to use this rule would be as a cost based on the probability that a forecaster or algorithm assigns, then checking to see which event actually occurs.

Scoring rules can be used beyond evaluation metrics to directly serve as loss function to construct estimators.

See also

Literature

  • Strictly Proper Scoring Rules, Prediction, and Estimation. Tilmann Gneiting &Adrian E Raftery Pages 359-378, https://doi.org/10.1198/016214506000001437, pdf

  • Scoring rules for continuous probability distributions, James E. Matheson, Robert L. Winkler, (1976) Scoring Rules for Continuous Probability Distributions. Management Science 22(10):1087-1096. http://dx.doi.org/10.1287/mnsc.22.10.1087

References