A graphical model is essentially a way of representing joint probability distribution over a set of random variables in a compact and intuitive form. There are two main types of graphical models, namely directed and undirected. We generally use a directed model, also known as a Bayesian network, when we mostly have a causal relationship between the random variables. Graphical models also give us tools to operate on these models to find conditional and marginal probabilities of variables, while keeping the computational complexity under control.
In this chapter, we will cover:
The basics of random variables, probability theory, and graph theory
Bayesian models
Independencies in Bayesian models
The relation between graph structure and probability distribution in Bayesian networks (IMAP)
Different ways of representing a conditional probability distribution
Code examples for all of these using
pgmpy