CouplingReport¶
- class telescopic.testing.CouplingReport(stay, moves, met, stale, near_misses)¶
The checks of
check_coupling().- Attributes:
- stay
tupleof two floats For the first and the second chain of the pairs, the Bonferroni-corrected p-value of Fisher’s exact tests, one from each starting point, that the chain stays put as often in a coupled step as in a step of the kernel alone.
- moves
tupleof two floats For the first and the second chain, the Bonferroni-corrected p-value of two-sample Kolmogorov-Smirnov tests, from each starting point, that compare the moved positions of a coupled step with those of a step alone, along random directions and in the distance moved; NaN where a position is NaN.
- met
float The fraction of pairs that met, with equal positions and equal
markov_fields: a coupling that never meets gives no estimate.- stale
int Chains whose returned log-density or gradient differs from a fresh evaluation at their position, which the engine reuses, and chains whose next step with the kernel’s caches, the fields of
extraoutside its Markov fields, differs from the same step without them.- near_misses
int Pairs whose positions differ by at most 64 units in the last place in every coordinate: a coupling that recomputes Y where it should copy X’s proposal leaves them, and the engine never sees such pairs meet.
- stay
- passed(alpha=0.001)¶
Whether every p-value is at least
alphaand pairs met, with no stale state or near miss.A p-value of NaN fails. Each of the four p-values is compared with
alphawithout a correction for their number, so a correct coupling fails these checks with probability at most about4 * alpha.