120
1.Bayesian Networks 2.Conditional Independence 3.Creating Tables 4.Notations for Bayesian Networks 5. 5. Calculating conditional Calculating conditional probabilities from the table probabilities from the tables 6. 6. Calculating conditional Calculating conditional independence independence 7. 7. Markov Chain Monte Carlo Markov Chain Monte Carlo 8. 8. Markov Models. Markov Models. 9. 9. Markov Models and Probabilistic Markov Models and Probabilistic methods in vision methods in vision Used in Spring 2012, Spring 2013, Winter 2014 (partially)

2014_0287_Bayes Networks.ppt

Embed Size (px)

Citation preview

Page 1: 2014_0287_Bayes Networks.ppt

1.Bayesian Networks2.Conditional Independence3.Creating Tables4.Notations for Bayesian Networks5.5.Calculating conditional probabilities Calculating conditional probabilities

from the tablefrom the tables6.6.Calculating conditional independenceCalculating conditional independence7.7.Markov Chain Monte CarloMarkov Chain Monte Carlo8.8.Markov Models.Markov Models.9.9.Markov Models and Probabilistic Markov Models and Probabilistic

methods in visionmethods in vision

Used in Spring 2012, Spring 2013, Winter 2014 (partially)

Page 2: 2014_0287_Bayes Networks.ppt

Introduction to Introduction to Probabilistic RoboticsProbabilistic Robotics

1. Probabilities2. Bayes rule3. Bayes filters4. Bayes networks5. Markov Chains

new

next

Page 3: 2014_0287_Bayes Networks.ppt

Bayesian Networks and Bayesian Networks and Markov ModelsMarkov Models

many many more

• Bayesian networks and Markov models :Bayesian networks and Markov models :1. Applications in User ModelingUser Modeling2. Applications in Natural Language Natural Language

ProcessingProcessing3. Applications in robotic controlrobotic control4.4. Applications in Applications in robot Visionrobot Vision

Page 4: 2014_0287_Bayes Networks.ppt

Bayesian Networks (BNs) – Bayesian Networks (BNs) – OverviewOverview

• Introduction to BNs– Nodes, structure and probabilities– Reasoning with BNs– Understanding BNs

• Extensions of BNs– DecisionDecision Networks– DynamicDynamic Bayesian Networks (DBNs)

Page 5: 2014_0287_Bayes Networks.ppt

Definition of Bayesian Networks

• A data structure that represents the dependence between variables

• Gives a concise specification of the joint probability joint probability distributiondistribution

• A Bayesian Network is a directed acyclic graph (DAG) in which the following holds:1. A set of random variables makes up the nodes in the

network2. A set of directed links connects pairs of nodes3. Each node has a probability distribution that quantifies

the effects of its parents

5

Page 6: 2014_0287_Bayes Networks.ppt

Conditional Conditional IndependenceIndependence

The relationship between :– conditional independence – and BN structure is important for understanding how BNs work

6

Page 7: 2014_0287_Bayes Networks.ppt

Conditional Independence – Causal ChainsCausal Chains

• Causal chains give rise to conditional independence

• Example: “Smoking causes cancer, which causes dyspnoea”

)|()|( BCPBACP

A B C

A B C

smoking cancer dyspnoea

Page 8: 2014_0287_Bayes Networks.ppt

Conditional Independence – Common CausesCommon Causes

• Common Causes (or ancestors) also give rise to conditional independence

Example: Example: “Cancer is a common cause of the two symptoms: a positive Xray and dyspnoea”

BCABCPBACP | indep )|()|(

A

B

C

cancer

( ) (A indep C) | B

Xray dyspnoea

I have dyspnoea (C ) because of cancer (B) so I do not need an Xray test

Page 9: 2014_0287_Bayes Networks.ppt

Conditional Dependence – Common Effects

• Common effects (or their descendants) give rise to conditional dependence

• Example: “Cancer is a common effect common effect of pollution and smoking”Given cancer, smoking “explains away” pollution

)| indep ()()()|( BCACPAPBCAP

A

B

C

cancer

smoking

pollution

pollutioncancer

( )

We know that you smoke and have cancer, we do not need to assume that your cancer was caused by pollution

???

Page 10: 2014_0287_Bayes Networks.ppt

Joint Distributions Joint Distributions for describing for describing uncertain worldsuncertain worlds

• Researchers found already numerous and dramatic benefits of Joint Distributions for describing uncertain worlds

• Students in robotics and Artificial Intelligence have to understand problems with using Joint Distributions

• You should discover how Bayes Net methodology allows us to build Joint Distributions in manageable chunks

10

Page 11: 2014_0287_Bayes Networks.ppt

Bayes Net methodologyBayes Net methodology

1. Bayesian Methods are one of the most important most important conceptual advances in the Machine Learning / AI field to have emerged since 1995.

2. A clean, clear, manageable language and methodology for expressing what the robot designer is certain and uncertain about

3. Already, many practical applications in medicine, factories, helpdesks: for instancefor instance1. P(this problem | these symptoms) // we will use P as probability2. anomalousness of this observation3. choosing next diagnostic test | these observations

11

Why Bayesian methods matter?

Page 12: 2014_0287_Bayes Networks.ppt

12

Page 13: 2014_0287_Bayes Networks.ppt

Problem 1: Problem 1: Creating Creating Joint Joint

Distribution TableDistribution Table• Joint Distribution Table is an

important concept

Page 14: 2014_0287_Bayes Networks.ppt

Truth table of all combinations of Boolean

Variables

Probabilistic truth table • You can

guess this table, you can take data from some statistics,

• You can build this table based on some partial tables

Page 15: 2014_0287_Bayes Networks.ppt

• Idea – use decision diagrams to represent these data.

Page 16: 2014_0287_Bayes Networks.ppt

Use of Use of independence independence

while creating the while creating the tablestables

Page 17: 2014_0287_Bayes Networks.ppt

Wet – Wet – Sprinkler – Sprinkler –

Rain Rain ExampleExample17

Page 18: 2014_0287_Bayes Networks.ppt

18

W

S

R

Wet-Sprinkler-Rain Example

Page 19: 2014_0287_Bayes Networks.ppt

Problem 1: Problem 1: Creating the Joint Creating the Joint

TableTable

Page 20: 2014_0287_Bayes Networks.ppt

Our Goal is to derive this table

But the same data can be stored explicitely or implicitely, not necessarily in the form of a table!!

What extra assumptions can help to create this

table?

Let us observe that if I know 7 of these, the eight is obviously unique , as their sum = 1

So I need to guess or calculate or find 2n-1 = 7 values

Page 21: 2014_0287_Bayes Networks.ppt

21Wet-Sprinkler-Rain Example

Page 22: 2014_0287_Bayes Networks.ppt

22Understanding of causation

Wet-Sprinkler-Rain Example

Sprinkler on Sprinkler on under condition that it rainedrained

You need to understand causation when you create the table

Page 23: 2014_0287_Bayes Networks.ppt

Independence simplifies probabilitiesIndependence simplifies probabilities

23Wet-Sprinkler-Rain Example

We can use these probabilities to create the

table

P(S|R) = Sprinkler on under condition that it rained

S and R are independent

We use independence of variables S and R

Page 24: 2014_0287_Bayes Networks.ppt

24

This first step shows the collected data

Conditional Probability Table

(CPT)

Grass is wet

It rainedSprinkler was on

Wet-Sprinkler-Rain Example

We create the CPT for S and R based on our knowledge of the problem

What about children playing or a dog pissing?It is still possible by this value 0.1

Page 25: 2014_0287_Bayes Networks.ppt

Full joint for only S and RFull joint for only S and R

25Wet-Sprinkler-Rain Example

Use chain rule for probabilities

0.950.900.90

0.01

Independence of S and R is used

Page 26: 2014_0287_Bayes Networks.ppt

Chain Rule Chain Rule for Probabilitiesfor Probabilities

0.950.900.90

0.01

Random variables

Page 27: 2014_0287_Bayes Networks.ppt

Full joint probability

Wet-Sprinkler-Rain Example

• You have a table

• You want to calculate some probability

P(~W)

Page 28: 2014_0287_Bayes Networks.ppt

28

Six numbers

Wet-Sprinkler-Rain Example

We reduced only from seven to six numbers

Independence of S and R implies calculating fewer numbers Independence of S and R implies calculating fewer numbers to create the complete Joint Table for W, S and Rto create the complete Joint Table for W, S and R

Page 29: 2014_0287_Bayes Networks.ppt

Explanation of Explanation of Diagrammatic Diagrammatic

NotationsNotationssuch as Bayes Networkssuch as Bayes Networks

You do not need to build the complete table!!

Page 30: 2014_0287_Bayes Networks.ppt

30You can build a graph of tables or nodes which correspond to certain types of tables

Page 31: 2014_0287_Bayes Networks.ppt

Wet-Sprinkler-Rain Example

Page 32: 2014_0287_Bayes Networks.ppt

This first step shows the collected data

Conditional Probability Table

(CPT)

Grass is wet

It rainedSprinkler was on

Wet-Sprinkler-Rain Example

Page 33: 2014_0287_Bayes Networks.ppt

Full joint probability

When you have this table you can modify it,

you can also calculate everything!!

• You have a table

• You want to calculate some probability

P(~W)

Page 34: 2014_0287_Bayes Networks.ppt

Problem 2: Problem 2: Calculating conditional Calculating conditional probabilities from the probabilities from the

Joint Distribution Joint Distribution TableTable

Page 35: 2014_0287_Bayes Networks.ppt

Probability that S=T and W=TProbability that S=T = Probability that grass is wet

under assumption that sprinkler was on

Wet-Sprinkler-Rain Example

Page 36: 2014_0287_Bayes Networks.ppt

36Wet-Sprinkler-Rain Example

Page 37: 2014_0287_Bayes Networks.ppt

37

We showed examples of both causal inference and diagnostic inference

Wet-Sprinkler-Rain Example

We will use this in next slide

Page 38: 2014_0287_Bayes Networks.ppt

““Explaining Away” the facts Explaining Away” the facts from the tablefrom the table

38Wet-Sprinkler-Rain Example

<<

Calculated earlier from this table

Page 39: 2014_0287_Bayes Networks.ppt

Conclusions on this problem

1. Table can be used for Explaining Away2. Table can be used to calculate

conditional independence.3. Table can be used to calculate

conditional probabilities4. Table can be used to determine

causality

39

Page 40: 2014_0287_Bayes Networks.ppt

Problem 3: What if S and R Problem 3: What if S and R are dependent?are dependent?

Calculating Calculating conditional independenceconditional independence

Page 41: 2014_0287_Bayes Networks.ppt

Conditional Independence of Conditional Independence of SS and and RR

41

Wet-Sprinkler-Rain Example

Page 42: 2014_0287_Bayes Networks.ppt

Diagrammatic notation for conditional Diagrammatic notation for conditional Independence Independence of two variablesof two variables

42

Wet-Sprinkler-Rain Example

extended

Page 43: 2014_0287_Bayes Networks.ppt

S3

S2S1

Conditional Independence formalized for Conditional Independence formalized for sets of variablessets of variables

Page 44: 2014_0287_Bayes Networks.ppt

Now we will explain conditional independence

CLOUDY - Wet-Sprinkler-Rain Example

Page 45: 2014_0287_Bayes Networks.ppt

Example – Example – Lung Cancer Lung Cancer

DiagnosisDiagnosis

Page 46: 2014_0287_Bayes Networks.ppt

Example – Lung Cancer DiagnosisExample – Lung Cancer Diagnosis1. A patient has been suffering from shortness of

breath (called dyspnoea) and visits the doctor, worried that he has lung cancer.

2. The doctor knows that other diseases, such as tuberculosis and bronchitis are possible causes, as well as lung cancer.

3. She also knows that other relevant information includes whether or not the patient is a smoker (increasing the chances of cancer and bronchitis) and what sort of air pollution he has been exposed to.

4. A positive Xray would indicate either TB or lung cancer. 46

Page 47: 2014_0287_Bayes Networks.ppt

Nodes and Values in Bayesian NetworksQ: What are the Q: What are the nodes to represent and what and what

values can they take? values can they take?A: Nodes can be discrete or continuous• Boolean nodes – represent propositions taking binary

valuesExample: Cancer node represents proposition “the patient has cancer”

• Ordered valuesExample: Pollution node with values low, medium, high

• Integral valuesExample: Age with possible values 1-120

47Lung Cancer Lung Cancer

Page 48: 2014_0287_Bayes Networks.ppt

Lung Cancer Example: Nodes and Values

Node name Type ValuesPollution Binary {low,high}Smoker Boolean {T,F}Cancer Boolean {T,F}Dyspnoea Boolean {T,F}Xray Binary {pos,neg}

Example of variables as nodes in BN

Page 49: 2014_0287_Bayes Networks.ppt

Lung Cancer Example: Bayesian Network StructureBayesian Network Structure

49

Pollution Smoker

Cancer

Xray Dyspnoea

Lung Cancer Lung Cancer

Page 50: 2014_0287_Bayes Networks.ppt

CConditional onditional PProbability robability TTablesables (CPTs) (CPTs)

in Bayesian Networks in Bayesian Networks

Page 51: 2014_0287_Bayes Networks.ppt

Conditional Probability Conditional Probability TablesTables (CPTs (CPTs) in ) in Bayesian NetworksBayesian Networks

After specifying topology, we must specify specify

the CPT the CPT for each discrete node1. Each row of CPT contains the

conditional probability of each node value for each possible combination of values in its parent nodes

2. Each row of CPT must sum to 13. A CPT for a Boolean variable with n

Boolean parents contains 2n+1 probabilities

4. A node with no parents has one row (its prior probabilities)

51

Page 52: 2014_0287_Bayes Networks.ppt

Lung Cancer Example: example of CPT

52

Pollution low

Smoking is true

C= cancerP = pollutionS = smokingX = XrayD = Dyspnoea

Bayesian Network for cancer

Probability of cancer given state of variables P and S

Lung Cancer Lung Cancer

Page 53: 2014_0287_Bayes Networks.ppt

• Several small CPTs are used to create larger JDTs.

Page 54: 2014_0287_Bayes Networks.ppt

The Markov Property Markov Property for Bayesian Networks

• Modelling with BNs requires assuming the Markov Property:– There are no direct dependencies in the system

being modelled which are not already explicitly shown via arcs

• Example: smoking can influence dyspnoeadyspnoea only through causing cancer

Markov’s Idea: Markov’s Idea: all information is modelled by arcs

Page 55: 2014_0287_Bayes Networks.ppt

Software NETICA Software NETICA for for

Bayesian Networks Bayesian Networks and and

joint probabilitiesjoint probabilities

Page 56: 2014_0287_Bayes Networks.ppt

Reasoning with Numbers – Using Netica software

56Here are the collected dataLung Cancer Lung Cancer

Page 57: 2014_0287_Bayes Networks.ppt

Representing the Representing the Joint Probability Joint Probability Distribution: Distribution: ExampleExample

)|Pr()|Pr(

),|Pr(

)Pr()Pr(

)Pr(

TCTDTCposX

FSlowPTC

FSlowP

TDposXTCFSlowP

57

P = pollutionS = smokingX = XrayD = Dyspnoea

This graph shows how we can calculate the joint probability from other probabilities in the network

We want to calculate this

Lung Cancer Lung Cancer

Page 58: 2014_0287_Bayes Networks.ppt

Problem 4:Problem 4:Determining Causality Determining Causality

and Bayes Nets: and Bayes Nets:

Advertisement Advertisement exampleexample

Page 59: 2014_0287_Bayes Networks.ppt

Causality and Bayes Nets: Causality and Bayes Nets: Advertisement exampleAdvertisement example• Bayes nets allow one to learn about causal

relationships• One more Example:– Marketing analysts want to know whether to increase,

decrease or leave unchanged the exposure of some advertisement in order to maximize profit from the sale of some product

– Advertised (A) and Buy (B) will be variables for someone having seen the advertisement seen the advertisement or purchased the product

Advertised-Buy Example

Page 60: 2014_0287_Bayes Networks.ppt

Causality ExampleExample1. So we want to know the probability that B=true given that

we force A=true, or A=false

2. We could do this by finding two similar populations and observing B based on A=trueA=true for one and A=false for the other

3. But this may be difficult or expensive difficult or expensive to find such populations

Advertised-Buy Example

–Buy (B) will be variables for someone purchased the product

–Advertised (A) seen the advertisementseen the advertisement

Page 61: 2014_0287_Bayes Networks.ppt

How causality can be How causality can be represented in a represented in a

graph?graph?

Page 62: 2014_0287_Bayes Networks.ppt

Markov condition and Causal Markov condition and Causal Markov ConditionMarkov Condition

• But how do we learn whether or not A causes B at all?

• The Markov Condition Markov Condition states:– Any node in a Bayes net is conditionally independent of its

non-descendants given its parents

• The CAUSAL Markov Condition CAUSAL Markov Condition (CMC) states:– Any phenomenon in a causal net is independent of its non-is independent of its non-

effects effects given its direct causes

Advertised-Buy ExampleAdvertised (A) and Buy (B)

Page 63: 2014_0287_Bayes Networks.ppt

Acyclic Causal Graph Acyclic Causal Graph versus versus Bayes Net Bayes Net

• Thus, if we have a directed acyclic causal graph C for variables in X, then, by the Causal Markov Condition, C is also a Bayes net is also a Bayes net for the joint probability distribution of X

• The reverse is not necessarily true—a network may satisfy the Markov condition without depicting causality

Advertised-Buy Example

Page 64: 2014_0287_Bayes Networks.ppt

Causality Example: Causality Example: when we learn that p(b|a) and p(b|a’) are not equal

• Given the Causal Markov Condition CMCCausal Markov Condition CMC, we can infer causal relationships from conditional (in)dependence relationships learned from the datalearned from the data

• Suppose we learn with high Bayesian probability with high Bayesian probability that p(b|a)p(b|a) and p(b|a’) p(b|a’) are not equalnot equal

• Given the CMC, there are four simple causal explanations for this: (more complex ones too)

Page 65: 2014_0287_Bayes Networks.ppt

Causality Example: four causal explanations

B causes AIf you buy more, they have more money to advertise

A causes B

If they advertise more you buy more

Page 66: 2014_0287_Bayes Networks.ppt

Causality Example: four causal explanations

1. Hidden common cause of A and B (e.g. income)

selection bias

A and B are causes for data selection 1. (a.k.a. selection bias, 2. perhaps if database didn’t record

false instances of A and B)

In rich country they advertise more and they buy more

If you increase information about Ad in database, then you increase also information about Buy in the database

Page 67: 2014_0287_Bayes Networks.ppt

Causality Example continued

• But we still don’t know if A But we still don’t know if A causes Bcauses B

• Suppose– We learn about the Income (I)

and geographic Location (L) of the purchaser

– And we learn with high Bayesian probability the network on the right

Advertised-Buy ExampleAdvertised (A=Ad) and Buy (B)

Page 68: 2014_0287_Bayes Networks.ppt

Causality Example - using CMC

• Given the Causal Markov Condition CMC, the ONLY causal explanation for the conditional (in)dependence relationships encoded in the Bayes net is that Ad is a cause for Buy

• That is, none of the other relationships or combinations thereof produce the probabilistic relationships encoded here

Advertised-Buy ExampleAdvertised (Ad) and Buy (B)

Page 69: 2014_0287_Bayes Networks.ppt

Causality in Bayes Networks

• Thus, Bayes Nets allow inference of causal inference of causal relationshipsrelationships by the Causal Markov Condition (CMC)

Page 70: 2014_0287_Bayes Networks.ppt

Problem 5:Problem 5:Determine Determine

D-separationD-separation in in Bayesian NetworksBayesian Networks

Page 71: 2014_0287_Bayes Networks.ppt

D-separation in Bayesian NetworksD-separation in Bayesian Networks

• We will formulate a Graphical Criterion a Graphical Criterion of conditional independence

• We can determine whether a set of nodes X is independent of another set Y, given a set of evidence nodes E, via the Markov property:Markov property:– If every undirected path from a node in X to a

node in Y is d-separated by E, then X and Y are conditionally independent conditionally independent given E

Page 72: 2014_0287_Bayes Networks.ppt

Determining D-separation (cont)

Chain

Common Common causecause

Common Common effecteffect

• A set of nodes E d-separates two sets of nodes X and Ynodes X and Y, if every undirected path from a node in X to a node in Y is blocked given E

• A path is blocked given a set of nodes E, if there is a node Z on the path for which one of three conditions holds:1. Z is in E and Z has one arrow on the path leading in and one arrow out (chain)(chain)2. Z is in E and Z has both path arrows leading out (common cause(common cause)3. Neither Z nor any descendant of Z is in E, and both path arrows lead into Z (common effectcommon effect)

Page 73: 2014_0287_Bayes Networks.ppt

Another Another ExampleExample of of Bayesian Networks: Bayesian Networks: AlarmAlarm

• Let us draw BN from these data

Alarm Example

Page 74: 2014_0287_Bayes Networks.ppt

74

Bayes Net Bayes Net Corresponding to Corresponding to Alarm-Alarm-

Burglar problemBurglar problem

Alarm Example

Page 75: 2014_0287_Bayes Networks.ppt

Compactness, Global Semantics, Local Compactness, Global Semantics, Local Semantics and Markov BlanketSemantics and Markov Blanket

• Compactness of Bayes Net

75Alarm Example

Burglar Earthquake

John callsMary calls

Page 76: 2014_0287_Bayes Networks.ppt

Global Semantics, Global Semantics, Local Semantics and Local Semantics and

Markov Blanket Markov Blanket for BNsfor BNs• Useful concepts 76

Page 77: 2014_0287_Bayes Networks.ppt

Alarm Example

Page 78: 2014_0287_Bayes Networks.ppt

78

Page 79: 2014_0287_Bayes Networks.ppt

79

Markov’s blanket are:1.Parents2.Children3.Children’s parent

Page 80: 2014_0287_Bayes Networks.ppt

Problem 6Problem 6How to How to

systematically Build systematically Build a Bayes Network a Bayes Network

-- -- ExampleExample

Page 81: 2014_0287_Bayes Networks.ppt

81

Page 82: 2014_0287_Bayes Networks.ppt

Alarm Example

Page 83: 2014_0287_Bayes Networks.ppt

83Alarm Example

Page 84: 2014_0287_Bayes Networks.ppt

84Alarm Example

Page 85: 2014_0287_Bayes Networks.ppt

85

So we add arrow

Alarm Example

Page 86: 2014_0287_Bayes Networks.ppt

86Alarm Example

Page 87: 2014_0287_Bayes Networks.ppt

87Alarm Example

Page 88: 2014_0287_Bayes Networks.ppt

Bayes Net for the car that does not Bayes Net for the car that does not want to startwant to start

88

Such networks can be used for robot diagnostics or diagnostic of a human done by robot

Page 89: 2014_0287_Bayes Networks.ppt

Inference in Bayes Nets and how to Inference in Bayes Nets and how to simplify itsimplify it

89

Alarm Example

Page 90: 2014_0287_Bayes Networks.ppt

First method of simplification: First method of simplification: EnumerationEnumeration

90Alarm Example

Page 91: 2014_0287_Bayes Networks.ppt

91Alarm Example

Page 92: 2014_0287_Bayes Networks.ppt

Second method: Second method: Variable Variable EliminationElimination

92

Alarm Example

Variable A was eliminated

Variable E was eliminated

Page 93: 2014_0287_Bayes Networks.ppt

93Polytrees are better

3SAT Example

Page 94: 2014_0287_Bayes Networks.ppt

94

IDEA: Convert DAG to polytrees

Page 95: 2014_0287_Bayes Networks.ppt

Clustering is used to convert non-Clustering is used to convert non-polytree BNspolytree BNs

95

Page 96: 2014_0287_Bayes Networks.ppt

96

Not a polytree Is a polytree

Alarm Example

EXAMPLEEXAMPLE: Clustering is used to convert : Clustering is used to convert non-polytree BNsnon-polytree BNs

Page 97: 2014_0287_Bayes Networks.ppt

• Approximate InferenceApproximate Inference

1. Direct sampling methods2. Rejection sampling3. Likelihood weighting4. Markov chain Monte Carlo

97

Page 98: 2014_0287_Bayes Networks.ppt

1. Direct 1. Direct Sampling Sampling MethodsMethods

98

Page 99: 2014_0287_Bayes Networks.ppt

Direct SamplingDirect SamplingDirect Sampling generates minterms with their probabilities

Page 100: 2014_0287_Bayes Networks.ppt

100Wet Sprinkler Rain Example

W=wetC= cloudyR = rainS = sprinkler

We start from top

Page 101: 2014_0287_Bayes Networks.ppt

101Wet Sprinkler Rain Example

W=wetC= cloudyR = rainS = sprinkler

Cloudy = yes

Page 102: 2014_0287_Bayes Networks.ppt

102Wet Sprinkler Rain Example

W=wetC= cloudyR = rainS = sprinkler

Cloudy = yes

Page 103: 2014_0287_Bayes Networks.ppt

103Wet Sprinkler Rain Example

W=wetC= cloudyR = rainS = sprinkler

sprinkler = no

Page 104: 2014_0287_Bayes Networks.ppt

104Wet Sprinkler Rain Example

W=wetC= cloudyR = rainS = sprinkler

Page 105: 2014_0287_Bayes Networks.ppt

105Wet Sprinkler Rain Example

W=wetC= cloudyR = rainS = sprinkler

Page 106: 2014_0287_Bayes Networks.ppt

106Wet Sprinkler Rain Example

W=wetC= cloudyR = rainS = sprinkler

We generated a sample minterm C S’ R W

Page 107: 2014_0287_Bayes Networks.ppt

2. Rejection 2. Rejection Sampling Sampling MethodsMethods

107

Page 108: 2014_0287_Bayes Networks.ppt

Rejection Sampling• Reject inconsistent samples

108Wet Sprinkler Rain Example

Page 109: 2014_0287_Bayes Networks.ppt

3. Likelihood 3. Likelihood weighting weighting methodsmethods

109

Page 110: 2014_0287_Bayes Networks.ppt

110

Page 111: 2014_0287_Bayes Networks.ppt

111Wet Sprinkler Rain Example

W=wetC= cloudyR = rainS = sprinkler

Page 112: 2014_0287_Bayes Networks.ppt

112Wet Sprinkler Rain Example

W=wetC= cloudyR = rainS = sprinkler

Page 113: 2014_0287_Bayes Networks.ppt

113Wet Sprinkler Rain Example

W=wetC= cloudyR = rainS = sprinkler

Page 114: 2014_0287_Bayes Networks.ppt

114Wet Sprinkler Rain Example

W=wetC= cloudyR = rainS = sprinkler

Page 115: 2014_0287_Bayes Networks.ppt

115Wet Sprinkler Rain Example

W=wetC= cloudyR = rainS = sprinkler

Page 116: 2014_0287_Bayes Networks.ppt

116Wet Sprinkler Rain Example

W=wetC= cloudyR = rainS = sprinkler

Page 117: 2014_0287_Bayes Networks.ppt

117Wet Sprinkler Rain Example

W=wetC= cloudyR = rainS = sprinkler

Page 118: 2014_0287_Bayes Networks.ppt

Likelihood weighting Likelihood weighting vs. rejection rejection samplingsampling

1. Both generate consistent estimates of the joint distribution conditioned on the values of the evidence variables

2. Likelihood weighting converges faster converges faster to the correct probabilities

3. But even likelihood weighting degrades likelihood weighting degrades with many evidence variables because a few samples will have nearly all the total weight

Page 119: 2014_0287_Bayes Networks.ppt

119

Page 120: 2014_0287_Bayes Networks.ppt

SourcesProf. David PageMatthew G. Lee

Nuria Oliver,Barbara Rosario

Alex PentlandEhrlich Av

Ronald J. WilliamsAndrew Moore tutorial with the same title

Russell &Norvig’s AIMA site Alpaydin’s Introduction to Machine Learning site.