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

Summary


In this chapter, we built from the last two by extending our abilities to manage models with more than one parameter. This turned out to be something very simple to do with the help of PyMC3. For example, obtaining the marginal distribution from the posterior is just a matter of properly indexing the trace. We also explored a few examples of using the posterior to derive quantities of interest from it, such as synthetic data or measures to better explain the data. We found the Gaussian model for the first, but certainly not the last, time, since it is one of the pillars of data analysis. Before we had any time to glorify the Gaussian model, we pushed it to its limits with the help of potential outliers in the data. Therefore, we learned to relax the normality assumption by using the Student's t-distribution, which led us to the concept of robust models and how we can change a model to better fit our problem. We used the Gaussian model in the context of comparing groups, a common...