AI & ML Unit 2 Notes
AI & ML Unit 2 Notes
Probabilistic Reasoning:
✓ Baye’s rule
✓ Bayesian Statistics
Probability:
Conditional Probability:
Bayesian Inference:
• It is used to calculate next step pf robot when already executed step is given.
• Helpful in weather forecasting.
• Solve Monty Hall problem
Bayesian Networks:
• Each node corresponds to the random variables, and a variable can be continuous
or discrete.
• 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.
• These links represent that one node directly influence the other node.
• The Bayesian network graph does not contain any cyclic graph. Hence, it is
known as a directed acyclic graph or DAG.
• The Bayesian network has mainly two components: 1. Causal Component 2.
Actual numbers
• Bayesian network is based on Joint probability distribution and conditional
probability.
• If variables are 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], 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].
• Global semantics defines the full joint distribution as the product of local
condition distributions.
• Local semantics defines each node is conditionally independent of its
nondescendants given its parents.
Example:
The network structure is showing that burglary and earthquake is the parent node of the alarm and directly
affecting the probability of alarm's going off.
• Given the intractability of exact inference in large networks, we will consider approximate inference
methods.
• This section describes randomized sampling algorithms, also called Monte Carlo algorithms.
• 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.
• MCMC generates each event by making a random change to the preceding event.
• It is therefore helpful to think of the network as being in a particular current state
specifying a value for every variable.
• The next state is generated by randomly sampling a value for one of the
nonevidence variables Xi, conditioned on the current values of the variables in
the Markov blanket of Xi.
• MCMC therefore wanders randomly around the state space-the space of possible
complete assignmentsflipping one variable at a time, but keeping the evidence
variables fixed.
• Consider the query P(Rain1 Sprinkler = true, Wet Grass = true) applied to the
network.
• The evidence variables Sprinkler and WetGrass are fixed to their observed values
and the hidden variables Cloudy and Rain are initialized randomly.
• Thus, the initial state is [true, true, false, true]. Now the following steps are
executed repeatedly:
• Cloudy is sampled, given the current values of its Markov blanket variables: in
this case, we sample from P(Cloudy1 Sprinkler = true, Rain =false). Suppose the
result is Cloudy =false. Then the new current state is [false, true, false, true].
Causal Networks:
• SCMs consists of two parts: a graph which visualizes causal connections, and
equations which express the details of the connection. Graph is a mathematical
construction that consists of vertices(nodes) and edges(links).
• SCMs use a special kind pf graph called Directed Acyclic Graph(DAG) for
which all edges are directed and no cycles exist.
• DAGs are common starting place for causal inference.
• Bayesian and causal networks are completely identical.