Using ADVI's question

ferrine,Our Dear Maxim told me look this link “https://docs.pymc.io/notebooks/variational_api_quickstart.html”。 * But I can’t understand how to use ADVI method in example of the book
Book’s title《Bayesian Analysis with Python》

Help me~~o(╥﹏╥)oo(╥﹏╥)oo(╥﹏╥)o

I am glad that you are reading @aloctavodia’s book (I helped edited the Chinese translation).
I think the latest code is in https://github.com/aloctavodia/BAP/blob/master/first_edition/code/Chp4/04_Understanding_and_predicting_data_with_linear_regression_models.ipynb
But seems ADVI parts are removed, you should have a look at https://docs.pymc.io/notebooks/variational_api_quickstart.html instead

1 Like

你就是知乎上的那个!原来你在这里!:smiley::smiley::smiley:

Just to clarify, in that example ADVI was used to initialize NUTS, but now we recommend just using pm.sample() and let PyMC3 do the initialization for us. Although I should fix all that divergences!

1 Like
  • Look who this is!Our Dear Osvaldo!( • ̀ω•́ )✧
    You mean now don’t use NUTS()、Metropolis()、find_MAP(),just use pm.sample???

Yes, always go for pm.sample(...) first :wink:

2 Likes