1st Edition

Bayesian Modeling and Computation in Python

    420 Pages 83 Color & 118 B/W Illustrations
    by Chapman & Hall

    420 Pages 83 Color & 118 B/W Illustrations
    by Chapman & Hall

    Bayesian Modeling and Computation in Python aims to help beginner Bayesian practitioners to become intermediate modelers. It uses a hands on approach with PyMC3, Tensorflow Probability, ArviZ and other libraries focusing on the practice of applied statistics with references to the underlying mathematical theory.

    The book starts with a refresher of the Bayesian Inference concepts. The second chapter introduces modern methods for Exploratory Analysis of Bayesian Models. With an understanding of these two fundamentals the subsequent chapters talk through various models including linear regressions, splines, time series, Bayesian additive regression trees. The final chapters include Approximate Bayesian Computation, end to end case studies showing how to apply Bayesian modelling in different settings, and a chapter about the internals of probabilistic programming languages. Finally the last chapter serves as a reference for the rest of the book by getting closer into mathematical aspects or by extending the discussion of certain topics.

    This book is written by contributors of PyMC3, ArviZ, Bambi, and Tensorflow Probability among other libraries.

    Foreword

    Preface

    Symbols

    Chapter 1 Bayesian Inference

    Chapter 2 Exploratory Analysis of Bayesian Models

    Chapter 3 Linear Models and Probabilistic Programming Languages

    Chapter 4 Extending Linear Models

    Chapter 5 Splines

    Chapter 6 Time Series

    Chapter 7 Bayesian Additive Regression Trees

    Chapter 8 Approximate Bayesian Computation

    Chapter 9 End to End Bayesian Workflows

    Chapter 10 Probabilistic Programming Languages

    Chapter 11 Appendiceal Topics

    Glossary

    Bibliography

    Index

    Biography

    Osvaldo A. Martin is a Researcher at IMASL-CONICET in Argentina and the Department of Computer Science from Aalto University in Finland. He has a PhD in biophysics and structural bioinformatics. Over the years he has become increasingly interested in data analysis problems with a Bayesian flavor. He is especially motivated by the development and implementation of software tools for Bayesian statistics and probabilistic modeling.

    Ravin Kumar is a Data Scientist at Google and previously worked at SpaceX and sweetgreen among other companies. He has an M.S in Manufacturing Engineering and a B.S in Mechanical Engineering. He found Bayesian statistics to be an excellent tool for modeling organizations and informing strategy. This interest in flexible statistical modeling led to a warm welcoming open source community which he is honored to be a member of now.

    Junpeng Lao is a Data Scientist at Google. Prior to that he did his PhD and subsequently worked as a postdoc in Cognitive Neuroscience. He developed a fondness for Bayesian Statistics and generative modeling after working primarily with Bootstrapping and Permutation during his academic life.

    "By far one of the biggest challenges in the practical (and academic) application of Bayesian Statistics is that practitioners need both a strong understanding of the mathematics of Bayesian statistics as well as fairly sophisticated programming ability. This book does a consistently great job of teaching both of these simultaneously…One great example of this is that way in which practical advice, drawing from both academic experience and software engineering experience, is placed throughout the learning process. Pointing out tools to help avoid errors in your model, along with common libraries that make the process easier, really help the reader feel that they are being onboarded by an experienced, kind and helpful team of Bayesian Practitioners. This book is the advanced, practical Bayesian statistics book that is currently missing from my bookshelf."
    -Will Kurt, author of "Bayesian Statistics the Fun Way"

    "From a technical standpoint, the reviewed chapters are excellent. Too often, statistical textbooks are mathematically sound, but lacking in computational sophistication, or vice versa. These chapters are sound on both fronts. My current primary textbook for Bayesian computation is Bayesian Data Analysis, by Gelman et al. which is probably the standard in academia and industry with respect to applied Bayesian methods. Where Martin et al. differentiate themselves from Gelman et al. (and others) is in the incorporation of Python as the computing language used throughout the book…This manuscript has the potential to be a preferred textbook for those looking for a practical introduction to these methods."
    -Christopher Fonnesbeck, Vanderbilt University Medical Center and Senior Quantitative Analyst, New York Yankees

    "I think this book is particularly appropriate for Master's degree levels classes and intermediate level users in general. The topics can be quite advanced and are definitely original--a lot of them are not dealt with in the other books I know on the market. For instance, if I want to learn about Bayesian additive models with PyMC or time series with TFP, there are no other books on these topics yet. Chapter 8, about approximate Bayesian computation is also very novel, as it draws on the latest and most advanced research on the topic (as do chapters 6 and 7 for splines and BARTs). The focus the authors have on graphs, decision making under uncertainty, and the technical appendices are very useful. The first two allow for more concrete courses that alternate with more theoretical chapters and courses. The technical appendices allow students to concentrate on the substance during the chapters, and then to dive into the details of the implementation when it becomes necessary. In short, I think this book hits two targets that have not been hit yet: an intermediate-level book, written in Python."
    -Alexandre Andorra, PyMC Developer, Cofounder of PyMC Labs, and Host of the Learning Bayesian Statistics podcast

    "With the number of Bayesian statistics books proliferating, a natural question is ‘what sets this one apart’? First, the authors have a deep understanding of the software as they are contributors and developers of several Bayesian packages in the Python ecosystem. Second, the book covers useful but rarely discussed topics such as Bayesian additive regression trees (BART), fitting models with approximate Bayesian computation (ABC) methods and probabilistic programming languages, which takes a computer science perspective and compares several languages. Third, the book covers not only a wide range of models (splines, hierarchical, time series and state-space models are also discussed) but also provides depth of coverage so that users can apply the methods to their own research. ... The book is ideal for self-study, but end of chapter  exercises could make it suitable for an undergraduate course. Some knowledge of Python, probability and fitting models to data are need to fully benefit from the content."
    -Stanley E. Lazic in Journal of the Royal Statistical Society Series A (Statistics in Society)April 2022