Add the energy score scoring rule for comparing multivariate distributions #3362
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
In order to compare a predicted univariate distribution to a true univariate distribution Pyro already has
pyro.ops.stats.crps_empirical
which implements the Continuous Ranked Probability Score (CRPS) scoring rule for univariate distributions.For multivariate distributions we can only use the CRPS to compare marginals but not the full distribution, and therefore two predicted distributions with the same marginals but different full distribution will have the same per marginal CRPS score relative to the true distribution.
Proposal
The energy score scoring rule implemented in
pyro.ops.stats.energy_score_empirical
can be used to compare a predicted multivariate distribution to a true multivariate distribution, such that the score is minimized only if the full predicted multivariate distribution is equal to the full true multivariate distribution, i.e. it is not sufficient for the marginals of the predicted and true distributions to be the same in order to minimize the score (see more details here).