pyfli.analysis.stat_tests#
Compare simulated and experimental FLI/FLIM distributions with classical and multivariate tests.
This module belongs to pyfli.analysis and is part of PyFLI post-processing,
diagnostics, statistical comparison, and result-loading utilities for fitted FLI/FLIM
datasets. Public API includes classes TestStat and
FLIDistributionTest.
Classes
|
Run the flidistribution test routine. |
|
Run the test stat routine. |
- class TestStat(sim_batch, exp_batch, eps=1e-12)[source]#
Bases:
objectRun the test stat routine. batches. The class groups Anderson-Darling, Kolmogorov-Smirnov, likelihood-ratio, bootstrap confidence interval, and Bayesian evidence helpers behind one object.
- Parameters:
sim_batch (
np.ndarray) – Simulated result batch used as the reference distribution.exp_batch (
np.ndarray) – Experimental result batch used for comparison.eps (
float) – Small numerical tolerance used to avoid division-by-zero and boundary issues.
- kolmogorov_smirnov()[source]#
Run the kolmogorov smirnov routine.
- Returns:
Kolmogorov-Smirnov statistic and p-value for the supplied samples.
- Return type:
np.ndarray
- likelihood_ratio()[source]#
Poisson likelihood ratio: Λ = 2 (LL_bi - LL_mono)
Assumes sim_batch = biexp model exp_batch = data
- Return type:
- class FLIDistributionTest(sim_batch, exp_batch, eps=1e-12)[source]#
Bases:
objectRun the flidistribution test routine. MMD, energy distance, sliced Wasserstein, Frechet-style, and PCA-overlap metrics for validating whether simulations match measured data.
- Parameters:
sim_batch (
np.ndarray) – Simulated result batch used as the reference distribution.exp_batch (
np.ndarray) – Experimental result batch used for comparison.eps (
float) – Small numerical tolerance used to avoid division-by-zero and boundary issues.
- energy_distance()[source]#
Run the energy distance routine.
- Returns:
Object produced by energy distance.
- Return type:
Any
- frechet_distance()[source]#
Run the frechet distance routine.
- Returns:
Frechet distance between the supplied curves or point sequences.
- Return type:
np.ndarray