scoring_rules#
A collection of scoring rules for Bayes risk minimization with
ScoringRuleNetwork.
Examples#
>>> # A network to estimate both point estimates and parameters of a multivariate normal distribution.
>>> from bayesflow.scoring_rules import MeanScore, QuantileScore, MvNormalScore
>>> inference_network = bf.networks.ScoringRuleNetwork(
... mean=MeanScore(),
... quantiles=QuantileScore(),
... mvn=MvNormalScore(),
... )
Inherit from ScoringRule to build your own custom scoring rule.
Classes
|
Categorical cross-entropy scoring rule for classification tasks. |
|
\(S(\hat \theta, \theta) = | \hat \theta - \theta |^2\) |
|
\(S(\hat \theta, \theta) = | \hat \theta - \theta |\) |
|
\(S(\hat p_{\mu, \Sigma}, \theta; k) = -\log( \mathcal N (\theta; \mu, \Sigma))\) |
|
\(S(\hat \theta, \theta; k) = | \hat \theta - \theta |^k\) |
|
\(S(\hat p_\phi, \theta; k) = -\log(\hat p_\phi(\theta))\) |
|
\(S(\hat \theta_i, \theta; \tau_i) = (\hat \theta_i - \theta)(\mathbf{1}_{\hat \theta - \theta > 0} - \tau_i)\) |
|
Base class for scoring rules. |