simsit.uncertainty_metrics

Goodness-of-fit metrics for testing whether normalized residuals are consistent with a reference chi-squared distribution.

This module provides utilities to:

  • compute chi-squared values from residual vectors and covariance matrices

  • evaluate goodness of fit to a chi-squared reference distribution using a Cramér-von Mises statistic

  • examine binned Pearson residuals using equiprobable chi-squared bins

References

Horwood, J. T., Aristoff, J. M., Singh, N., Poore, A. B., & Hejduk, M. D. “Beyond covariance realism: a new metric for uncertainty realism.” Proceedings of SPIE, Signal and Data Processing of Small Targets, Vol. 9092, 2014.

Functions

chi2(residuals, covariance)

Compute chi-squared statistics from residual vectors and covariance matrices.

chi_squared_statistic(residuals, covariance)

Compute chi-squared statistics from residual vectors and covariance matrices.

cvm_chi2_test(values, ndof[, return_pvalue])

Compute the Cramér-von Mises statistic for fit to a chi-squared distribution.

cvm_chi_squared_test(values, ndof[, ...])

Compute the Cramér-von Mises statistic for fit to a chi-squared distribution.

cvm_statistic_to_pvalue(statistic, n)

Convert a Cramér-von Mises statistic to an approximate p-value.

pearson_bin_residuals(values, ndof, nbin)

Compute binned Pearson residuals for goodness-of-fit to a chi-squared distribution.

pearsons_chi(values, ndof, nbin)

Compute binned Pearson residuals for goodness-of-fit to a chi-squared distribution.