Transform Descriptive Graphs into Bayesian Networks
Explore directed, acyclic graphs for causal relationships and identify relationships between random variables.
In this lesson, we will discuss the process of converting a descriptive graph into a Bayesian network, a probabilistic graphical model that represents the relationships between random variables and their probabilities.
First, let's recall some important concepts linked to the concept of BN:
Directed graph: The edges in a Bayesian network are directed, meaning they have a specific direction, originating from one node (the parent node) and pointing towards another node (the child node). This directionality indicates the flow of influence or causality between the nodes. A directed edge from node A to node B implies that the probability distribution of node B depends on the value of node A. The directed nature of the edges allows us to represent conditional dependencies and model the causal relationships between variables.
Acyclic graph: A Bayesian network is also acyclic, which means that it does not contain any cycles or closed loops. This constraint ensures that the relationships between the nodes are well-defined and prevents circular dependencies or infinite loops in the model. Acyclicity enables consistent probabilistic inference and simplifies the computation of probabilities in the network.
The directed and acyclic nature of the edges in a Bayesian network is crucial for accurately representing the dependencies between the random variables, modeling causal relationships, and enabling efficient probabilistic inference.
Design a BN from a descriptive graph
Let's imagine a farmer who wants to keep the grass green and healthy throughout the year. He relies on two things to achieve this: rainfall and sprinkler irrigation.
He starts by tracking the weather conditions. He notices that sometimes it is cloudy and sometimes it is sunny. When it is cloudy, there is a chance of rain, and when it is sunny, there is no chance of rain. He also notices that when it is sunny, he uses his solar-powered sprinkler to irrigate the grass, but when it is cloudy, he relies on rainfall.
He asked our help to model his problem as a Bayesian network.
Step 1: Identify the random variables
Let’s start by defining the different components of the BN.
There are four boolean random variables:
Cloudy
,Sprinkler
,Rain
, andWet Grass
. We represent these by a node in the BN.Each variable can take on two states,
True
orFalse
.
Let’s have a look at our BN in the illustration below.
Nodes' names with nodes' states
Get hands-on with 1300+ tech skills courses.