官术网_书友最值得收藏!

Programming Probabilistically

"Our golems rarely have a physical form, but they too are often made of clay living in silicon as computer code." 
 - Richard McElreath

Now that we have a basic understanding of Bayesian statistics, we are going to learn how to build probabilistic models using computational tools. Specifically, we are going to learn about probabilistic programming with PyMC3. The basic idea is to specify models using code and then solve them in a more or less automatic way. It is not that we are too lazy to learn the mathematical way, nor are we elitist-hardcore-hackers-in-code. One important reason behind this choice is that many models do not lead to an analytic closed form, and thus we can only solve those models using numerical techniques.

Another reason to learn probabilistic programming is that modern Bayesian statistics is mainly done by writing code, and since we already know Python, why would we do it in another way? Probabilistic programming offers an effective way to build and solve complex models and allows us to focus more on model design, evaluation, and interpretation, and less on mathematical or computational details. In this chapter, and through the rest of this book, we are going to use PyMC3, a very flexible Python library for probabilistic programming, as well as ArviZ, a new Python library that will help us interpret the results of probabilistic models. Knowing PyMC3 and ArviZ will also help us to learn advanced Bayesian concepts in a more practical way.

In this chapter, we will cover the following topics:

  • Probabilistic programming
  • PyMC3 primer
  • The coin-flipping problem revisited
  • Summarizing the posterior
  • The Gaussian and student's t models
  • Comparing groups and the effect size
  • Hierarchical models and shrinkage
主站蜘蛛池模板: 华坪县| 绥中县| 吐鲁番市| 阿图什市| 富阳市| 定安县| 曲松县| 通化市| 嫩江县| 根河市| 深州市| 汤原县| 徐水县| 逊克县| 齐齐哈尔市| 钟山县| 舞阳县| 沅江市| 莱芜市| 开封县| 固原市| 万源市| 泰顺县| 承德县| 凤冈县| 玉田县| 鹤壁市| 鄯善县| 峡江县| 垫江县| 鄂尔多斯市| 禄劝| 南雄市| 鄢陵县| 铜川市| 海阳市| 治县。| 五峰| 炎陵县| 唐山市| 平果县|