Model comparison with PyMC3

Model comparison with ArviZ is more easily done than said!

waic_l = az.waic(trace_l)waic_l

waic

waic_se

p_waic

warning

0

28.750381

5.303983

2.443984

0

If you want to compute LOO instead of WAIC, you must use az.loo.

For WAIC and LOO PyMC3 reports four values:

  • A point estimate
  • The standard error of the point estimate (this is computed by assuming normality and hence it may not be very reliable when the sample size is low)
  • The effective number of parameters
  • A warning (read the A note on the reliability of WAIC and LOO computations section for more details)

Since the values of WAIC/LOO are always interpreted in a relative fashion, that is, by comparing them across models, ArviZ provides ...

Get Bayesian Analysis with Python - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.