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

Installing the necessary Python packages


The code in the book was written using Python version 3.5, and it is recommended you use the most recent version of Python 3 that is currently available, although most of the code examples may also run for older versions of Python, including Python 2.7, but code could need minor adjustments.

The recommended way to install Python and Python libraries is using Anaconda, a scientific computing distribution. You can read more about Anaconda and download it from https://www.continuum.io/downloads. Once Anaconda is in our system, we can install new Python packages with the following command:

conda install NamePackage

We will use the following Python packages:

  • Ipython 5.0

  • NumPy 1.11.1

  • SciPy 0.18.1

  • Pandas 0.18.1

  • Matplotlib 1.5.3

  • Seaborn 0.7.1

  • PyMC3 3.0

To install the latest stable version of PyMC3, run the following command on a command-line terminal:

pip install pymc3