Bayesian Networks and Decision Graphs Chapter 9 Chapter 9 p. 1/31 - - PowerPoint PPT Presentation

bayesian networks and decision graphs
SMART_READER_LITE
LIVE PREVIEW

Bayesian Networks and Decision Graphs Chapter 9 Chapter 9 p. 1/31 - - PowerPoint PPT Presentation

Bayesian Networks and Decision Graphs Chapter 9 Chapter 9 p. 1/31 A small quiz Which of the following two lotteries would you prefer?: Lottery A = [$1mill . ] , Lottery B = 0 . 1[$5mill . ] + 0 . 89[$1mill . ] + 0 . 01[$0] . Chapter


slide-1
SLIDE 1

Bayesian Networks and Decision Graphs

Chapter 9

Chapter 9 – p. 1/31

slide-2
SLIDE 2

A small quiz

Which of the following two lotteries would you prefer?:

  • Lottery A = [$1mill.],
  • Lottery B = 0.1[$5mill.] + 0.89[$1mill.] + 0.01[$0].

Chapter 9 – p. 2/31

slide-3
SLIDE 3

A small quiz

Which of the following two lotteries would you prefer?:

  • Lottery A = [$1mill.],
  • Lottery B = 0.1[$5mill.] + 0.89[$1mill.] + 0.01[$0].

What about these two?:

  • Lottery C = 0.11[$1mill.] + 0.89[$0],
  • Lottery D = 0.1[$5mill.] + 0.9[$0].

Chapter 9 – p. 2/31

slide-4
SLIDE 4

A small quiz

Which of the following two lotteries would you prefer?:

  • Lottery A = [$1mill.],
  • Lottery B = 0.1[$5mill.] + 0.89[$1mill.] + 0.01[$0].

What about these two?:

  • Lottery C = 0.11[$1mill.] + 0.89[$0],
  • Lottery D = 0.1[$5mill.] + 0.9[$0].

Is this the rational choice?

Chapter 9 – p. 2/31

slide-5
SLIDE 5

Reverse the directions?

Consider the following model: Flue Fever Sleepy The probability distributions P(Sleepy), P(Fever|Sleepy) and P(Flue|Fever) can be calculated from the model above and used in the model below. Flue Fever Sleepy So is there any difference??

Chapter 9 – p. 3/31

slide-6
SLIDE 6

Decisions

Taking the temperature and setting the temperature can be seen as a test decision and an action decision, respectively. Flue Fever Sleepy Action Test Impacts from the decisions:

  • Tests: Both directions
  • Actions: With the direction only.

Chapter 9 – p. 4/31

slide-7
SLIDE 7

Poker again

Consider the poker example again: OH0 FC OH1 SC OH2 BH MH Why request this?

Chapter 9 – p. 5/31

slide-8
SLIDE 8

Poker again

Consider the poker example again: OH0 FC OH1 SC OH2 BH MH Why request this? Fold or call?

  • Both placed 1$
  • She has placed 1$ more
  • fold ⇒ she takes the pot
  • call ⇒ place 1$ ⇒ best hand takes the pot

Chapter 9 – p. 5/31

slide-9
SLIDE 9

Call or fold?

This decision problem can be represented graphically by extending the BN with a decision node and a utility node: OH0 FC OH1 SC OH2 BH MH U D D fold call BH I −1 2

  • p.

−1 −2 draw −1 U(BH, D)

Chapter 9 – p. 6/31

slide-10
SLIDE 10

Call or fold?

This decision problem can be represented graphically by extending the BN with a decision node and a utility node: OH0 FC OH1 SC OH2 BH MH U D D fold call BH I −1 2

  • p.

−1 −2 draw −1 U(BH, D) The expected utility of call: EU(call|e) = 2 · P(BH = I|e) − 2 · P(BH = op.|e) + 0 · P(BH = draw|e) = X BH U(BH, call)P(BH|e)

Chapter 9 – p. 6/31

slide-11
SLIDE 11

Mildew

Two months before the harvest the farmer observes the state, Q, of his wheat field, and he can check whether the field is attacked by mildew, M. If there is a mildew attack he can decide for a treatment with fungicides.

Chapter 9 – p. 7/31

slide-12
SLIDE 12

Mildew

Two months before the harvest the farmer observes the state, Q, of his wheat field, and he can check whether the field is attacked by mildew, M. If there is a mildew attack he can decide for a treatment with fungicides. OM M OQ Q Harvest M∗ A C U

Chapter 9 – p. 7/31

slide-13
SLIDE 13

Mildew

Two months before the harvest the farmer observes the state, Q, of his wheat field, and he can check whether the field is attacked by mildew, M. If there is a mildew attack he can decide for a treatment with fungicides. OM M OQ Q Harvest M∗ A C U EU(A|e) = C(A) + X Harvest U(Harvest)P(Harvest|A, e)

Chapter 9 – p. 7/31

slide-14
SLIDE 14

One action in general

D Ul Uj Uk Ui has domain Xi

Chapter 9 – p. 8/31

slide-15
SLIDE 15

One action in general

D Ul Uj Uk Ui has domain Xi EU(D|e) = X

X1

U1(X1)P(X1|D, e) + · · · + X

Xn

Un(Xn)P(Xn|D, e) Choose an action with largest EU: Opt(D|e) = arg max

D

EU(D|e)

Chapter 9 – p. 8/31

slide-16
SLIDE 16

Utilities without money

Two courses: Graph algorithms (GA) and DSS Marks: 0, 1, 2, 3, 4, 5 (≥ 2 is a pass) Effort: Keep pace (kp), slow down (sd), follow superficially (fs) Effort kp sd fs GA 0.1 1 0.1 0.2 0.1 2 0.1 0.1 0.4 3 0.2 0.4 0.2 4 0.4 0.2 0.2 5 0.2 0.1 P(GA|Effort) Effort kp sd fs DSS 0.1 1 0.1 0.2 2 0.1 0.2 0.2 3 0.2 0.2 0.3 4 0.4 0.4 0.2 5 0.3 0.1 P(DSS|Effort) Max-score? Max-pass? Otherwise?

Chapter 9 – p. 9/31

slide-17
SLIDE 17

Marks as utilities?

Effort kp sd fs GA 0.1 1 0.1 0.2 0.1 2 0.1 0.1 0.4 3 0.2 0.4 0.2 4 0.4 0.2 0.2 5 0.2 0.1 P(GA|Effort) Effort kp sd fs DSS 0.1 1 0.1 0.2 2 0.1 0.2 0.2 3 0.2 0.2 0.3 4 0.4 0.4 0.2 5 0.3 0.1 P(DSS|Effort) EU(kp,fs) = X m∈GA P(m|kp)m + X m∈DSS P(m|fs)m = (0.1 · 1 + 0.1 · 2 + 0.2 · 3 + 0.4 · 4 + 0.2 · 5) + (0.2 · 1 + 0.2 · 2 + 0.3 · 3 + 0.2 · 4) = 5.8

Chapter 9 – p. 10/31

slide-18
SLIDE 18

Marks as utilities?

Effort kp sd fs GA 0.1 1 0.1 0.2 0.1 2 0.1 0.1 0.4 3 0.2 0.4 0.2 4 0.4 0.2 0.2 5 0.2 0.1 P(GA|Effort) Effort kp sd fs DSS 0.1 1 0.1 0.2 2 0.1 0.2 0.2 3 0.2 0.2 0.3 4 0.4 0.4 0.2 5 0.3 0.1 P(DSS|Effort) EU(kp,fs) = X m∈GA P(m|kp)m + X m∈DSS P(m|fs)m = (0.1 · 1 + 0.1 · 2 + 0.2 · 3 + 0.4 · 4 + 0.2 · 5) + (0.2 · 1 + 0.2 · 2 + 0.3 · 3 + 0.2 · 4) = 5.8 EU(sd,sd) = 6.1

Chapter 9 – p. 10/31

slide-19
SLIDE 19

Marks as utilities?

Effort kp sd fs GA 0.1 1 0.1 0.2 0.1 2 0.1 0.1 0.4 3 0.2 0.4 0.2 4 0.4 0.2 0.2 5 0.2 0.1 P(GA|Effort) Effort kp sd fs DSS 0.1 1 0.1 0.2 2 0.1 0.2 0.2 3 0.2 0.2 0.3 4 0.4 0.4 0.2 5 0.3 0.1 P(DSS|Effort) EU(kp,fs) = X m∈GA P(m|kp)m + X m∈DSS P(m|fs)m = (0.1 · 1 + 0.1 · 2 + 0.2 · 3 + 0.4 · 4 + 0.2 · 5) + (0.2 · 1 + 0.2 · 2 + 0.3 · 3 + 0.2 · 4) = 5.8 EU(sd,sd) = 6.1 EU(fs,kp) = 6.2 However, does the marks really reflect your utilities?

Chapter 9 – p. 10/31

slide-20
SLIDE 20

Subjective lotteries

I consider 2 as the worst mark (utility 0) and 5 as the best mark (utility 1). Now imagine the following lottery: 2 5 X p 1 − p 4 For which p am I indifferent??

Chapter 9 – p. 11/31

slide-21
SLIDE 21

Subjective lotteries

I consider 2 as the worst mark (utility 0) and 5 as the best mark (utility 1). Now imagine the following lottery: 2 5 X p 1 − p 4 For which p am I indifferent?? The utility table: 1 2 3 4 5 0.05 0.1 0.6 0.8 1 Effort GA DSS UGA UDSS (kp,fs),(sd,sd),(fs,kp) EU(Effort) = (1.015, 1.07, 1.035)

Chapter 9 – p. 11/31

slide-22
SLIDE 22

Instrumental rationality

  • 1. Reflexivity. For any lottery A, A A

Chapter 9 – p. 12/31

slide-23
SLIDE 23

Instrumental rationality

  • 1. Reflexivity. For any lottery A, A A
  • 2. Completeness. For any pair (A, B) of lotteries, A B or B A.

Chapter 9 – p. 12/31

slide-24
SLIDE 24

Instrumental rationality

  • 1. Reflexivity. For any lottery A, A A
  • 2. Completeness. For any pair (A, B) of lotteries, A B or B A.
  • 3. Transitivity. If A B and B C, then A C.

Chapter 9 – p. 12/31

slide-25
SLIDE 25

Instrumental rationality

  • 1. Reflexivity. For any lottery A, A A
  • 2. Completeness. For any pair (A, B) of lotteries, A B or B A.
  • 3. Transitivity. If A B and B C, then A C.
  • 4. Preference increasing with probability. If A B then αA + (1 − α)B βA + (1 − β)B if and
  • nly if α ≥ β.

Chapter 9 – p. 12/31

slide-26
SLIDE 26

Instrumental rationality

  • 1. Reflexivity. For any lottery A, A A
  • 2. Completeness. For any pair (A, B) of lotteries, A B or B A.
  • 3. Transitivity. If A B and B C, then A C.
  • 4. Preference increasing with probability. If A B then αA + (1 − α)B βA + (1 − β)B if and
  • nly if α ≥ β.
  • 5. Continuity. If A B C then there exists α ∈ [0, 1] such that B ∼ αA + (1 − α)C

Chapter 9 – p. 12/31

slide-27
SLIDE 27

Instrumental rationality

  • 1. Reflexivity. For any lottery A, A A
  • 2. Completeness. For any pair (A, B) of lotteries, A B or B A.
  • 3. Transitivity. If A B and B C, then A C.
  • 4. Preference increasing with probability. If A B then αA + (1 − α)B βA + (1 − β)B if and
  • nly if α ≥ β.
  • 5. Continuity. If A B C then there exists α ∈ [0, 1] such that B ∼ αA + (1 − α)C
  • 6. Independence. If C = αA + (1 − α)B and A ∼ D, then C ∼ (αD + (1 − α)B).

Chapter 9 – p. 12/31

slide-28
SLIDE 28

Instrumental rationality

  • 1. Reflexivity. For any lottery A, A A
  • 2. Completeness. For any pair (A, B) of lotteries, A B or B A.
  • 3. Transitivity. If A B and B C, then A C.
  • 4. Preference increasing with probability. If A B then αA + (1 − α)B βA + (1 − β)B if and
  • nly if α ≥ β.
  • 5. Continuity. If A B C then there exists α ∈ [0, 1] such that B ∼ αA + (1 − α)C
  • 6. Independence. If C = αA + (1 − α)B and A ∼ D, then C ∼ (αD + (1 − α)B).

Theorem: For an individual who acts according to a preference ordering satisfying rules 1-6

above, there exists a utility function over the outcomes s.t. the expected utility is maximized.

Chapter 9 – p. 12/31

slide-29
SLIDE 29

Are you rational

Recall:

  • Lottery A = [$1mill.],
  • Lottery B = 0.1[$5mill.] + 0.89[$1mill.] + 0.01[$0].
  • Lottery C = 0.11[$1mill.] + 0.89[$0],
  • Lottery D = 0.1[$5mill.] + 0.9[$0].

Chapter 9 – p. 13/31

slide-30
SLIDE 30

Are you rational

Recall:

  • Lottery A = [$1mill.],
  • Lottery B = 0.1[$5mill.] + 0.89[$1mill.] + 0.01[$0].
  • Lottery C = 0.11[$1mill.] + 0.89[$0],
  • Lottery D = 0.1[$5mill.] + 0.9[$0].

Let U(5mill) = 1, U(0) = 0, U(1mill) = u. If you prefer A over B we get u > 0.1 + 0.89u ⇔ u > 10 11 .

Chapter 9 – p. 13/31

slide-31
SLIDE 31

Are you rational

Recall:

  • Lottery A = [$1mill.],
  • Lottery B = 0.1[$5mill.] + 0.89[$1mill.] + 0.01[$0].
  • Lottery C = 0.11[$1mill.] + 0.89[$0],
  • Lottery D = 0.1[$5mill.] + 0.9[$0].

Let U(5mill) = 1, U(0) = 0, U(1mill) = u. If you prefer A over B we get u > 0.1 + 0.89u ⇔ u > 10 11 . Hence, EU(C) = 0.11u > 0.11 10 11 = 0.1 = EU(D), and C should therefore be preferred over D.

Chapter 9 – p. 13/31

slide-32
SLIDE 32

Decision trees

Inf Test T Test y Pour? pos Inf? pour 99.94 n −0.06 y 97.94 throw Pour? neg Inf? pour 99.94 n −0.06 y 97.94 throw Pour? n Inf? pour y 100 n 98 throw

Chapter 9 – p. 14/31

slide-33
SLIDE 33

Decision trees

Inf Test T Test y Pour? pos Inf? pour 99.94 n −0.06 y 97.94 throw Pour? neg Inf? pour 99.94 n −0.06 y 97.94 throw Pour? n Inf? pour y 100 n 98 throw Branches from chance nodes, , shall be labeled with the probability of the branch given the path down to the node. The probabilities can be found from the model → .

Chapter 9 – p. 14/31

slide-34
SLIDE 34

Solving decision trees I

Inf Test T Test y Pour? pos: 0.0107 Inf? pour 99.94 n: 0.9351 −0.06 y : . 6 4 9 97.94 throw Pour? n e g : . 9 8 9 3 Inf? pour 99.94 n: 0.999993 −0.06 y : . 7 97.94 throw Pour? n Inf? pour y: 0.0007 100 n : . 9 9 9 3 98 throw

Chapter 9 – p. 15/31

slide-35
SLIDE 35

Solving decision trees I

Inf Test T Test y Pour? pos: 0.0107 Inf? pour 99.94 n: 0.9351 −0.06 y : . 6 4 9 97.94 throw Pour? n e g : . 9 8 9 3 Inf? pour 99.94 n: 0.999993 −0.06 y : . 7 97.94 throw Pour? n Inf? pour y: 0.0007 100 n : . 9 9 9 3 98 throw The decision tree can be solved by going from the leaves towards the root:

  • Take weighted sum through chance nodes.
  • Take max through decision nodes.

Chapter 9 – p. 15/31

slide-36
SLIDE 36

Solving decision trees II

D1 A d1

1

D2 0.7 E d2

1

1 0.4 2 0.6 E d2

2

−3 . 3 4 . 7 1.5 0.3 B d1

2

2 . 9 0.1 C d1

3

3 0.8 −1 . 2

Chapter 9 – p. 16/31

slide-37
SLIDE 37

Solving decision trees II

D1 A d1

1

1.78 D2 0.7 1.33 E d2

1

1.6 1 0.4 0.4 2 0.6 1.2 E d2

2

1.9 −3 . 3 − . 9 4 . 7 2 . 8 1.5 0.3 0.45 B d1

2

1.8 2 . 9 1 . 8 0.1 C d1

3

2.2 3 0.8 2.4 −1 . 2 − . 2

Chapter 9 – p. 16/31

slide-38
SLIDE 38

Decision trees: characteristics

Advantages: ➤ All scenarios are represented explicitly. ➤ Very few restrictions on the decision problems that can be represented. Disadvantages: ➤ Two separate models are used: one representing the structure and one representing the uncertainties. ➤ The size of the decision trees grows exponentially in the number of variables.

Chapter 9 – p. 17/31

slide-39
SLIDE 39

An alternative representation

OH0 FC OH1 SC OH2 BH MH2 MH1 MH0 U D MSC MFC But how do we represent the sequence of decisions and observations?

Chapter 9 – p. 18/31

slide-40
SLIDE 40

Representing the decision sequence

Possible representation: OH0 FC OH1 SC OH2 BH MH2 MH1 MH0 U D MSC MFC All nodes observed before a decision are parents of that decision. ➤ Assuming that the decision maker doesn’t forget, then some links are redundant!

Chapter 9 – p. 19/31

slide-41
SLIDE 41

Representing the decision sequence

A better representation (an influence diagram): OH0 FC OH1 SC OH2 BH MH2 MH1 MH0 U D MSC MFC Advantages:

  • You can read the sequence of decisions.
  • You can read what is known at each point of decision.

Chapter 9 – p. 19/31

slide-42
SLIDE 42

Influence diagrams

D1 U1 B D F H I A C E G K J D2 D3 D4 U2 U3 U4 Nodes and links: Chance variable → causal links Decision variable → information links ♦ Utility function → utility link, U = P

i Ui.

Note:

  • We assume no-forgetting.
  • A directed path comprising all decisions ⇒ the scenario is well-defined.

Chapter 9 – p. 20/31

slide-43
SLIDE 43

Influence diagrams and Hugin

In Hugin the nodes are depicted as: Chance variable Decision variable: Utility nodes: ♦ Note that:

  • No tables are specified for decision nodes.
  • A utility function is specified for a utility node.

Chapter 9 – p. 21/31

slide-44
SLIDE 44

Influence diagrams: Characteristics

Advantages: ➤ Grows only linearly in the number of variables. ➤ Requires only one model for representing both structure as well as the uncertainty model. Disadvantages: ➤ The sequence of observations and decisions is the same in all scenarios (the decision problem is symmetric). Definition: A decision problem is said to be symmetric if: ➤ In all decision tree representations, the number of scenarios is the same as the cardi- nality of the Cartesian product of the state spaces of all chance and decision variables. ➤ in one decision tree representation, the sequence of observations and decisions is the same in all scenarios.

Chapter 9 – p. 22/31

slide-45
SLIDE 45

Symmetric decision trees

D1 D2 B F A C E U D1 A D2 C C D2 C C A D2 C C D2 C C

Chapter 9 – p. 23/31

slide-46
SLIDE 46

Symmetric decision trees

D1 D2 B F A C E U D1 A D2 C C D2 C C A D2 C C D2 C C The sequence of observations and decisions is the same in all scenarios: D1 A D2 C

Chapter 9 – p. 23/31

slide-47
SLIDE 47

Optimal strategy I

D1 D2 B F A C E U D1 A D2 C C D2 C C A D2 C C D2 C C

Chapter 9 – p. 24/31

slide-48
SLIDE 48

Optimal strategy I

D1 D2 B F A C E U D1 A D2 C C D2 C C A D2 C C D2 C C Solution for influene diagrams:

  • 1. Determine a policy for D2: σD2(D1, A) → D2.

For this we need P(C|D1, A, D2).

  • 2. Use σD2 for determining a policy for D1: σD1 → D1.

For this we need P(A|D1). All probabilities can be achieved from the model without folding out the decision tree.

Chapter 9 – p. 24/31

slide-49
SLIDE 49

Optimal strategy II

OH0 FC OH1 SC OH2 BH MH2 MH1 MH0 U D MSC MFC The policy for D: σD(MH0, MFC, FC, MH1, MSC, SC, MH2) → D We request: P(BH|MH0, MFC, FC, MH1, MSC, SC, MH2, D)

Chapter 9 – p. 25/31

slide-50
SLIDE 50

Optimal strategy II

OH0 FC OH1 SC OH2 BH MH2 MH1 MH0 U D MSC MFC The policy for D: σD(MH0, MFC, FC, MH1, MSC, SC, MH2) → D We request: P(BH|MH0, MFC, FC, MH1, MSC, SC, MH2, D) From d-separation we can find the relevant past!

Chapter 9 – p. 25/31

slide-51
SLIDE 51

Fishing in the north sea

Based on measurements, T, a quota for fishing volume, FV , for next year is decided. The amount of fish, V , and the quota determines the utility.

Chapter 9 – p. 26/31

slide-52
SLIDE 52

Fishing in the north sea

Based on measurements, T, a quota for fishing volume, FV , for next year is decided. The amount of fish, V , and the quota determines the utility. A five year period: T1 FV1 V1 U1 T2 FV2 V2 U2 T3 FV3 V3 U3 T4 FV4 V4 U4 T5 FV5 V5 U5 Unfortunately, the optimal policy for FV5 depends on the entire past: σF V5(T1, FV1, T2, FV2, T3, FV3, T4, FV4, T5) This is intractable!

Chapter 9 – p. 26/31

slide-53
SLIDE 53

Information blocking

T1 FV1 V1 U1 T2 FV2 V2 U2 T3 FV3 V3 U3 T4 FV4 V4 U4 T5 FV5 V5 U5 To make the calculations tractable we use an approximation instead: T1 FV1 V1 U1 T2 FV2 V2 U2 T3 FV3 V3 U3 T4 FV4 V4 U4 T5 FV5 V5 U5 The probability P(V2|T1, FV1) is taken from the initial model.

Chapter 9 – p. 27/31

slide-54
SLIDE 54

The dangers of non-observed nodes

Temporal links between non-observed nodes are dangerous! B1 E1 A1 C1 D1 U1 B2 E2 A2 C2 D2 U2 B3 E3 A3 C3 D3 U3

Chapter 9 – p. 28/31

slide-55
SLIDE 55

The dangers of non-observed nodes

Temporal links between non-observed nodes are dangerous! B1 E1 A1 C1 D1 U1 B2 E2 A2 C2 D2 U2 B3 E3 A3 C3 D3 U3 We introduce history variables to summarize the past: B1 E1 A1 C1 D1 Hist1 U1 B2 E2 A2 C2 D2 Hist2 U2

Chapter 9 – p. 28/31

slide-56
SLIDE 56

When are ID’s suitable for repeated use

  • The sequence of decisions D1, D2, . . . , Dn is fixed.
  • The chance variables in Ii are always observed after Di and before Di+1.
  • The decision maker remembers the past.
  • The decision problem is symmetric.

The decision-observation sequence is independent of the actual observations and decisions.

Chapter 9 – p. 29/31

slide-57
SLIDE 57

A cause of asymmetry: Test decisions

Take your temperature before deciding on aspirin. Flue Fever A-Fever Sleepy Aspirin Temp You only observe the test result (Fever) if you decide to take your temperature

Chapter 9 – p. 30/31

slide-58
SLIDE 58

A cause of asymmetry: Test decisions

But these problems can still be modeled in influence diagrams: Flue Fever A-Fever Sleepy Aspirin TF F’ Fever y n TF y (1, 0, 0) (0, 1, 0) n (0, 0, 1) (0, 0, 1) P(F ′ = (y, n, no-t)|Fever, TF )

Chapter 9 – p. 30/31

slide-59
SLIDE 59

Transformation of test-decisions in general

A D TA TA A′ D A A a1 a2 · · · an TA y (1, 0, . . . , 0) (0, 1, 0, . . . , 0) · · · (0, . . . , 0, 1, 0) n (0, . . . , 1) (0, . . . , 1) · · · (0, . . . , 1) P(F ′ = (a1, . . . , an, no − t)|A, TA)

Chapter 9 – p. 31/31