pyfli.cm_stats#

Shared statistics for PyFLI, defined once and used across the package: deviance (Poisson deviance), chi_square (Pearson/Neyman chi-square, degrees of freedom), goodness_of_fit (SSR, RMSE, R2), model_comparison (nested F-test), robust (median/MAD) and shared_metrics (fit summaries, tau ordering, lifetime/FRET summaries).

Modules

chi_square

Pearson and Neyman chi-square statistics and the degrees of freedom of a fit.

deviance

Poisson deviance statistics: per-gate terms, the summed and reduced deviance, and its expectation (and variance) under the model for photon counts.

goodness_of_fit

Residual-based goodness of fit: sum of squared residuals, RMSE and the coefficient of determination R2, for NumPy arrays or torch tensors.

model_comparison

Nested-model comparison of fit statistics (mono- vs bi-exponential).

robust

Robust location/scale: median and median absolute deviation (MAD), and the MAD-to-sigma factor of a normal distribution.

shared_metrics

Centralize tau ordering, lifetime summaries, FRET efficiency, and fit-quality metrics.