pyfli.cm_stats.chi_square#
Pearson and Neyman chi-square statistics and the degrees of freedom of a fit.
Functions
|
|
|
Neyman chi-square |
|
Pearson chi-square |
|
Per-gate Pearson terms |
- degrees_of_freedom(n, n_params, minimum=1)[source]#
n - n_params, raised to at least minimum (Noneleaves it unbounded).
- pearson_chi_square(model, data, axis=-1, floor=1.0)[source]#
Pearson chi-square
sum((d - mu)^2 / max(mu, floor))along axis – the fit statistic reported before the switch to the Poisson deviance. The default variance floor of 1 count makes it read belown - pwhen many gates hold less than one expected count.