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

Chapter 6. Model Comparison

 

"All models are wrong, but some are useful."

 
 --George Box

We have already discussed the idea that models are wrong in the sense that they are just approximations used in an attempt to understand a problem through data and not a verbatim copy of the real world. While every model is wrong, not every model is equally wrong; some models will be worse than others at describing the same data. In the previous chapters, we focused our attention on the inference problem, that is, how to learn the value of parameters from the data. In this chapter, we are going to focus on a different problem: how to compare two or more models used to explain the same data. As we will learn, this is not a simple problem to solve and at the same time is a central problem in data analysis.

In the present chapter, we will explore the following topics:

  • Occam's razor, simplicity and accuracy overfitting, and underfitting

  • Regularizing priors

  • Information criteria

  • Bayes factors