Bayesian networks with examples in R

This clear and well-structured book is the second edition of the same authors’ 2014 book, Bayesian Networks With Examples in R. In addition to the core material covered in the first edition, the new edition expands several topics such as conditional Gaussian Bayesian networks, dynamic Bayesian networks, and general Bayesian networks, etc. It’s worth mentioning that there is a website for this book and the related R package, “bnlearn”, in which the R code used in the book can be downloaded and additional examples are provided. This book can be suitable for an introductory Bayesian network course at the MS or PhD level. Chapters 1 to 4 follow a similar structure to introduce several types of Bayesian network. Each chapter presents graphical and probabilistic representation of Bayesian network, parameter estimation, structure learning, inference, and Bayesian network plotting. Chapter 1 focuses on multinomial Bayesian network for discrete data, whereas Chapter 2 on Gaussian Bayesian network for continuous data. In these two chapters, all the variables follow probability distributions belonging to the same family, either multinomial or normal. Chapter 3 introduces conditional Gaussian Bayesian network that is a “mixture of normals” model in which continuous nodes can have both continuous and discrete parents while discrete nodes can only have discrete parents. This chapter demonstrates an initial step to combine different families of probability distributions in building a Bayesian network. Chapter 4 discusses dynamic Bayesian network for dynamic problems in which some variables can evolve over time, therefore a variable measured at different times can be treated as different nodes in Bayesian network. Chapter 5 presents general Bayesian network in which each variable is modeled by its most suitable distribution rather than limited to follow multinomial or normal distribution. Since this is a more general case for Bayesian network building, Stan (an open source software for Bayesian statistical inference using Markov chain Monte Carlo sampling) and its R interface, “rstan”, are adopted to perform random sampling and parameter estimation. Chapter 6 covers theoretical foundations for Bayesian network, in which the formal definition of a Bayesian network and its properties are introduced, and the algorithms for Bayesian network learning and inference are included. This chapter also discusses two important topics: what are the assumptions and challenges in learning a causal Bayesian network; and what considerations are needed to evaluate a Bayesian network. Chapter 7 provides an overview of software packages for Bayesian network development. A number of R packages are listed in a table, along with information on each package’s capability to handle discrete and/or continuous data, as well as its support for structure learning, parameter learning, and inference. Stan and its features are discussed, and several commercial software packages are briefly mentioned in this chapter. Chapter 8 presents two real-world applications in life sciences. The first application illustrates how to build a Bayesian network to discover the interactions and the pathways characterizing biological processes in human cells. The second application focuses on designing a predictive approach that learns a Bayesian network to predict human body composition. Moreover, introductory material on probability, statistics and graph theory and the solutions to the exercises are included at the end of the book. In summary, this book provides real-world examples with extensive R codes to demonstrate the potential of Bayesian networks in a wide range of application areas, which I believe is extremely beneficial for both scholars and practitioners. Furthermore, the major R package used in this book, “bnlearn”, is developed and maintained by the first author, and a website is available for readers to access the R code and additional examples.