Hierarchical model from Statistical Rethinking takes a long time to build

Hi @matsuo_basho
I’m guess you mean ‘sample’ rather than build? A few quick observations:

  • you are importing PyMC 3, which is quite old now. The latest is version 5. So you could try updating your version.
  • I would recommend starting with the default target_accept parameter. Ie, try just removing this argument as it’s currently set very high.
  • Exponential priors on standard deviations might not be suitable. If you end up with zero standard deviations then this won’t work very well. So you could try HalfNormal or Gamma distributions.
1 Like