bebi103.stan.check_divergences

bebi103.stan.check_divergences(samples, quiet=False, return_diagnostics=False)

Check transitions that ended with a divergence.

Parameters
  • samples (ArviZ InferenceData instance) – Contains samples to be checked. Must contain both posterior and sample_stats.

  • quiet (bool, default False) – If True, do not print diagnostic result to the screen.

  • return_diagnostics (bool, default False) – If True, return both a Boolean about whether the diagnostic passed and the number of samples where the tree depth was too deep. Otherwise, only return Boolean if the test passed.

Returns

  • passed (bool) – Return True if tree depth test passed. Return False otherwise.

  • n_divergent (int, optional) – Number of divergent samples.