Book description
Learn the fundamentals of Bayesian modeling using state-of-the-art Python libraries, such as PyMC, ArviZ, Bambi, and more, guided by an experienced Bayesian modeler who contributes to these libraries
Key Features
- Conduct Bayesian data analysis with step-by-step guidance
- Gain insight into a modern, practical, and computational approach to Bayesian statistical modeling
- Enhance your learning with best practices through sample problems and practice exercises
- Purchase of the print or Kindle book includes a free PDF eBook.
Book Description
The third edition of Bayesian Analysis with Python serves as an introduction to the main concepts of applied Bayesian modeling using PyMC, a state-of-the-art probabilistic programming library, and other libraries that support and facilitate modeling like ArviZ, for exploratory analysis of Bayesian models; Bambi, for flexible and easy hierarchical linear modeling; PreliZ, for prior elicitation; PyMC-BART, for flexible non-parametric regression; and Kulprit, for variable selection.
In this updated edition, a brief and conceptual introduction to probability theory enhances your learning journey by introducing new topics like Bayesian additive regression trees (BART), featuring updated examples. Refined explanations, informed by feedback and experience from previous editions, underscore the book's emphasis on Bayesian statistics. You will explore various models, including hierarchical models, generalized linear models for regression and classification, mixture models, Gaussian processes, and BART, using synthetic and real datasets.
By the end of this book, you will possess a functional understanding of probabilistic modeling, enabling you to design and implement Bayesian models for your data science challenges. You'll be well-prepared to delve into more advanced material or specialized statistical modeling if the need arises.
What you will learn
- Build probabilistic models using PyMC and Bambi
- Analyze and interpret probabilistic models with ArviZ
- Acquire the skills to sanity-check models and modify them if necessary
- Build better models with prior and posterior predictive checks
- Learn the advantages and caveats of hierarchical models
- Compare models and choose between alternative ones
- Interpret results and apply your knowledge to real-world problems
- Explore common models from a unified probabilistic perspective
- Apply the Bayesian framework's flexibility for probabilistic thinking
Who this book is for
If you are a student, data scientist, researcher, or developer looking to get started with Bayesian data analysis and probabilistic programming, this book is for you. The book is introductory, so no previous statistical knowledge is required, although some experience in using Python and scientific libraries like NumPy is expected.
Table of contents
-
Bayesian Analysis with Python
Third Edition
- Preface
-
Chapter 1
Thinking Probabilistically
- 1.1 Statistics, models, and this book’s approach
- 1.2 Working with data
- 1.3 Bayesian modeling
- 1.4 A probability primer for Bayesian practitioners
- 1.5 Interpreting probabilities
- 1.6 Probabilities, uncertainty, and logic
- 1.7 Single-parameter inference
- 1.8 How to choose priors
- 1.9 Communicating a Bayesian analysis
- 1.10 Summary
- 1.11 Exercises
- Join our community Discord space
- Chapter 2 Programming Probabilistically
- Chapter 3 Hierarchical Models
- Chapter 4 Modeling with Lines
-
Chapter 5
Comparing Models
- 5.1 Posterior predictive checks
- 5.2 The balance between simplicity and accuracy
- 5.3 Measures of predictive accuracy
- 5.4 Calculating predictive accuracy with ArviZ
- 5.5 Model averaging
- 5.6 Bayes factors
- 5.7 Bayes factors and inference
- 5.8 Regularizing priors
- 5.9 Summary
- 5.10 Exercises
- Join our community Discord space
- Chapter 6 Modeling with Bambi
-
Chapter 7
Mixture Models
- 7.1 Understanding mixture models
- 7.2 Finite mixture models
- 7.3 The non-identifiability of mixture models
- 7.4 How to choose K
- 7.5 Zero-Inflated and hurdle models
- 7.6 Mixture models and clustering
- 7.7 Non-finite mixture model
- 7.8 Continuous mixtures
- 7.9 Summary
- 7.10 Exercises
- Join our community Discord space
-
Chapter 8
Gaussian Processes
- 8.1 Linear models and non-linear data
- 8.2 Modeling functions
- 8.3 Multivariate Gaussians and functions
- 8.4 Gaussian processes
- 8.5 Gaussian process regression
- 8.6 Gaussian process regression with PyMC
- 8.7 Gaussian process classification
- 8.8 Cox processes
- 8.9 Regression with spatial autocorrelation
- 8.10 Hilbert space GPs
- 8.11 Summary
- 8.12 Exercises
- Join our community Discord space
- Chapter 9 Bayesian Additive Regression Trees
-
Chapter 10
Inference Engines
- 10.1 Inference engines
- 10.2 The grid method
- 10.3 Quadratic method
- 10.4 Markovian methods
- 10.5 Sequential Monte Carlo
- 10.6 Diagnosing the samples
- 10.7 Convergence
- 10.8 Effective Sample Size (ESS)
- 10.9 Monte Carlo standard error
- 10.10 Divergences
- 10.11 Keep calm and keep trying
- 10.12 Summary
- 10.13 Exercises
- Join our community Discord space
- Chapter 11 Where to Go Next
- Bibliography
- Other Books You May Enjoy
- Index
Product information
- Title: Bayesian Analysis with Python - Third Edition
- Author(s):
- Release date: January 2024
- Publisher(s): Packt Publishing
- ISBN: 9781805127161
You might also like
book
Bayesian Analysis with Python - Second Edition
Bayesian modeling with PyMC3 and exploratory analysis of Bayesian models with ArviZ Key Features A step-by-step …
book
Interpretable Machine Learning with Python - Second Edition
A deep dive into the key aspects and challenges of machine learning interpretability using a comprehensive …
book
Applied Computational Thinking with Python - Second Edition
Use the computational thinking philosophy to solve complex problems by designing appropriate algorithms to produce optimal …
book
Machine Learning with Python Cookbook, 2nd Edition
This practical guide provides more than 200 self-contained recipes to help you solve machine learning challenges …