Closed taliaweiss closed 5 years ago
Mathieu and I think we should use a processor like stan_utility.py
, to yield outputs like the one below:
n_eff / iter looks reasonable for all parameters.
CONVERGENCE WARNING: Rhat above 1.1 indicates that the chains very likely have not mixed.
0.0 of 89432 iterations ended with a divergence (0.0%).
0 of 89432 iterations saturated the maximum tree depth of 10. (0%)
E-BFMI indicated no pathological behavior.
Done with #130
Confirm that most recent pyStan version in morpho (2.18) outputs warnings for all five convergence diagnostics: n_eff/iter, Rhat, divergences, tree_depth, E-BFMI.
Alternatively, create a processor based on the morpho1 file morpho/morpho/postprocessing/stan_utility.py, which would automatically be called when Stan runs and which prints out five lines summarizing the results of the convergence checks. The benefit of this approach is that the user would always be clearly aware of what checks had been performed.
These convergence checks are important because often, they provide a red flag that something is off when that is not immediately evident from posteriors, allowing the user to further explore the reason for non-convergence.