Book Image

Bayesian Analysis with Python

Book Image

Bayesian Analysis with Python

Overview of this book

The purpose of this book is to teach the main concepts of Bayesian data analysis. We will learn how to effectively use PyMC3, a Python library for probabilistic programming, to perform Bayesian parameter estimation, to check models and validate them. This book begins presenting the key concepts of the Bayesian framework and the main advantages of this approach from a practical point of view. Moving on, we will explore the power and flexibility of generalized linear models and how to adapt them to a wide array of problems, including regression and classification. We will also look into mixture models and clustering data, and we will finish with advanced topics like non-parametrics models and Gaussian processes. With the help of Python and PyMC3 you will learn to implement, check and expand Bayesian models to solve data analysis problems.
Table of Contents (15 chapters)
Bayesian Analysis with Python
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Continuous mixtures


This chapter was focused on discrete mixture models but we can also have continuous mixture models. And indeed we already know some of them. One example of a continuous mixture model is the robust logistic regression model that we saw earlier. This is a mixture of two components: a logistic on one hand and a random guessing on the other. Note that the parameter is not an on/off switch, but instead is more like a mix-knob controlling how much random guessing and how much logistic regression we have in the mix. Only for extreme values of do we have a pure random-guessing or pure logistic regression.

Hierarchical models can be also be interpreted as continuous mixture models where the parameters in each group come from a continuous distribution in the upper level. To make it more concrete, think about performing linear regression for several groups. We can assume that each group has it own slope or that all the groups share the same slope. Alternatively, instead of framing...