anees

probnumeval.multivariate.anees(approximate_solution, reference_solution)[source]

Compute the average normalised estimation error squared.

Also known as chi-squared statistic. It computes

\[\chi^2 := \frac{1}{N + 1} \sum_{n=0}^N (y^*(t_n) - \mathbb{E}[y(t_n)])^\top \mathbb{C}[y(t_n)]^{-1} (y^*(t_n) - \mathbb{E}[y(t_n)])\]

where \(\mathbb{E}\) is the mean and \(\mathbb{C}\) is the covariance. If \(y\) is a Gaussian process, \(\chi^2\) follows a chi-squared distribution. For a \(d\) dimensional solution, the outcome is

  • Underconfident if \(\chi^2 < d\) holds. The estimated error is way larger than the actual error.

  • Overconfident if \(\chi^2 > d\) holds. The estimated error is way smaller than the actual error.

Parameters
  • approximate_solution (Union[Normal, _RandomVariableList]) – Approximate solution as returned by a (Gaussian) probabilistic numerical method.

  • reference_solution (ndarray) – Reference solution. This is an array, because it must be a deterministic point-estimate.

Returns

Return type

ANEES statistic (i.e. \(\chi^2\) above).

See also

chi2_confidence_intervals()

Confidence intervals for the ANEES test statistic.

non_credibility_index()

An alternative calibration measure.