Bayesian Belief Network, Exact Inference, Approx Inference, Causal Network

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

1.

Bayesian Belief Network in artificial intelligence


Bayesian belief network is key computer technology for dealing with probabilistic events
and to solve a problem which has uncertainty. We can define a Bayesian network as:

"A Bayesian network is a probabilistic graphical model which represents a set of variables
and their conditional dependencies using a directed acyclic graph."

It is also called a Bayes network, belief network, decision network, or Bayesian model.

Bayesian networks are probabilistic, because these networks are built from a probability
distribution, and also use probability theory for prediction and anomaly detection.

Real world applications are probabilistic in nature, and to represent the relationship
between multiple events, we need a Bayesian network. It can also be used in various tasks
including prediction, anomaly detection, diagnostics, automated insight, reasoning,
time series prediction, and decision making under uncertainty.

Bayesian Network can be used for building models from data and experts opinions, and it
consists of two parts:

o Directed Acyclic Graph


o Table of conditional probabilities.

The generalized form of Bayesian network that represents and solve decision problems
under uncertain knowledge is known as an Influence diagram.

A Bayesian network graph is made up of nodes and Arcs (directed links), where:

o Each node corresponds to the random variables, and a variable can


be continuous or discrete.
o Arc or directed arrows represent the causal relationship or conditional
probabilities between random variables. These directed links or arrows connect the
pair of nodes in the graph.
o These links represent that one node directly influence the other node, and if there is
no directed link that means that nodes are independent with each other
o In the above diagram, A, B, C, and D are random variables represented
by the nodes of the network graph.
o If we are considering node B, which is connected with node A by a
directed arrow, then node A is called the parent of Node B.
o Node C is independent of node A.

Note: The Bayesian network graph does not contain any cyclic graph. Hence it is known as
directed acyclic graph or DAG.

The Bayesian network has mainly two components:

o Causal Component

o Actual numbers

Each node in the Bayesian network has condition probability distribution P(Xi |Parent(Xi)
), which determines the effect of the parent on that node.

Bayesian network is based on Joint probability distribution and conditional probability. So


let's first understand the joint probability distribution:

Joint probability distribution:

If we have variables x1, x2, x3,....., xn, then the probabilities of a different combination of x1,
x2, x3.. xn, are known as Joint probability distribution.

P[x1, x2, x3,....., xn], it can be written as the following way in terms of the joint probability
distribution.

= P[x1| x2, x3,....., xn]P[x2, x3,....., xn]

= P[x1| x2, x3,....., xn]P[x2|x3,....., xn]....P[xn-1|xn]P[xn].

In general for each variable Xi, we can write the equation as:

P(Xi|Xi-1,........., X1) = P(Xi |Parents(Xi ))

Explanation of Bayesian network:

Let's understand the Bayesian network through an example by creating a directed acyclic
graph:
1. What is the probability that the alarm has sounded but neither a burglary nor an
earthquake has occurred and both John and Mary call?
Hence, a Bayesian network can answer any query about the domain by using Joint
distribution.

The semantics of Bayesian Network:

There are two ways to understand the semantics of the Bayesian network, which is given
below:

1. To understand the network as the representation of the Joint probability


distribution.

It is helpful to understand how to construct the network.

2. To understand the network as an encoding of a collection of conditional


independence statements.

It is helpful in designing inference procedure.


2. Inferences in Bayesian Network
2.1 Exact inference in Bayesian Network
2.2 Approximate Inference in Bayesian Network
Given the intractability of exact inference in large networks, we will now consider
approximate inference methods. This section describes randomized sampling
algorithms, also called Monte Carlo algorithms that provide approximate answers
whose accuracy depends on the number of samples generated. They work by
generating random events based on the probabilities in the Bayes net and counting
up the different answers found in those random events. With enough samples, we
can get arbitrarily close to recovering the true probability distribution—provided
the Bayes net has no deterministic conditional distributions.

We describe two families of algorithms: direct sampling and Markov chain


sampling.
1. Direct sampling methods
The primitive element in any sampling algorithm is the generation of samples from
a known probability distribution. For example, an unbiased coin can be thought of
as a random variable Coin with values <heads,tails> and a prior distribution P(Coin)
= <0.5,0.5>. Sampling from this distribution is exactly like flipping the coin: with
probability 0.5 it will return heads, and with probability 0.5 it will return tails.
We begin with a random sampling process for a Bayes net that has no evidence
associated with it. The idea is to sample each variable in turn, in topological order.
The probability distribution from which the value is sampled is conditioned on the
values already assigned to the variable’s parents.

Applying it to the network in Figure with the ordering Cloudy, Sprinkler, Rain,
WetGrass, we might produce a random event as follows:
Rejection sampling in Bayesian networks
Rejection sampling is a general method for producing samples from a hard-to-
sample distribution given an easy-to-sample distribution. In its simplest form, it can
be used to compute conditional probabilities—that is, to determine P(X | e). The
REJECTION-SAMPLING first generates samples from the prior distribution specified
by the network. Then, it rejects all those that do not match the evidence.

Likelihood Weighting
3. Causal Networks

You might also like