Decision Networks Yuqing Tang BROOKLYN Doctoral Program in - - PowerPoint PPT Presentation

decision networks
SMART_READER_LITE
LIVE PREVIEW

Decision Networks Yuqing Tang BROOKLYN Doctoral Program in - - PowerPoint PPT Presentation

Decision Networks Yuqing Tang BROOKLYN Doctoral Program in Computer Science The Graduate Center City University of New York ytang@cs.gc.cuny.edu COLLEGE Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 1 / 30 Outline Introduction 1


slide-1
SLIDE 1

Decision Networks

Yuqing Tang

BROOKLYN COLLEGE

Doctoral Program in Computer Science The Graduate Center City University of New York ytang@cs.gc.cuny.edu

Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 1 / 30

slide-2
SLIDE 2

Outline

1

Introduction

2

Decision networks Decision networks with intervening actions Dynamic Belief Networks

3

Summary

Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 2 / 30

slide-3
SLIDE 3

Introduction

Bayesian networks can be extended to support decision making. Preferences between different outcomes of various plans.

◮ Utility theory

Decision theory = Utility theory + Probability theory.

Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 3 / 30

slide-4
SLIDE 4

Bayesian Decision Theory

Frank Ramsey (1926) Decision making under uncertainty: what action to take (plan to adopt) when future state of the world is not known. B ¯ayesian answer: Find utility of each possible outcome (action-state pair) and take the action that maximizes expected utility. Example action Rain (p = 0.4) Shine (1 − p = 0.6) Take umbrella 30 10 Leave umbrella −100 50 Expected utilities: E(Take umbrella) = (30)(0.4) + (10)(0.6) = 18 E(Leave umbrella) = (−100)(0.4) + (50)(0.6) = −10

Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 4 / 30

slide-5
SLIDE 5

Outline

1

Introduction

2

Decision networks Decision networks with intervening actions Dynamic Belief Networks

3

Summary

Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 5 / 30

slide-6
SLIDE 6

Decision Networks

A Decision network represents information about the agent’s current state its possible actions the state that will result from the agent’s action the utility of that state Also called, Influence Diagrams (Howard&Matheson,1981).

U Weather wet 0.3 dry 0.7 W P(W)

Result

R AB U(R,AB) melb_wins yes 40 melb_wins no 20 melb_loses no −5 melb_loses yes −20

Accept Bet

wet 0.6 dry 0.25 W P(R=melb_wins|W)

Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 6 / 30

slide-7
SLIDE 7

Type of nodes

Chance nodes: (ovals) represent random variables (same as Bayesian networks). Has an associated CPT. Parents can be decision nodes and other chance nodes. Decision nodes: (rectangles) represent points where the decision maker has a choice of actions. Utility nodes: (diamonds) represent the agent’s utility function (also called value nodes in the literature). Parents are variables describing the outcome state that directly affect utility. Has an associated table representing multi-attribute utility function.

U Weather wet 0.3 dry 0.7 W P(W)

Result

R AB U(R,AB) melb_wins yes 40 melb_wins no 20 melb_loses no −5 melb_loses yes −20

Accept Bet

wet 0.6 dry 0.25 W P(R=melb_wins|W) Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 7 / 30

slide-8
SLIDE 8

Decision networks (example)

Example Clare’s football team, Melbourne, is going to play her friend John’s team,

  • Carlton. John offers Clare a friendly bet: whoever’s team loses will buy the

wine next time they go out for dinner. They never spend more than $15

  • n wine when they eat out. When deciding whether to accept this bet,

Clare will have to assess her team’s chances of winning (which will vary according to the weather on the day). She also knows that she will be happy if her team wins and miserable if her team loses, regardless of the bet.

U Weather wet 0.3 dry 0.7 W P(W)

Result

R AB U(R,AB) melb_wins yes 40 melb_wins no 20 melb_loses no −5 melb_loses yes −20

Accept Bet

wet 0.6 dry 0.25 W P(R=melb_wins|W) Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 8 / 30

slide-9
SLIDE 9

Expectation and expected utilities

Expectation E(X) = Σv∈Domain(X)v · P(X = v) Expected utility of an action given evidence EU(A|E) = ΣiP(Oi|E, A)U(Oi|A) E is the available evidence A is an action taken Oi is one of the possible outcome state U is the utility function which measures the utility of the outcome Oi given the action A

Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 9 / 30

slide-10
SLIDE 10

Evaluating Decision Networks

1 Add any available evidence. 2 For each action value in the decision node: 1

Set the decision node to that value;

2

Calculate the posterior probabilities for the parent nodes of the utility node, as for Bayesian networks, using a standard inference algorithm;

3

Calculate the resulting expected utility for the action.

4

Return the action with the highest expected utility.

Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 10 / 30

slide-11
SLIDE 11

Evaluating Decision Networks: Example

P(R = melb wins) = P(W = w)P(R = melb wins|W = w) +P(W = d)P(R = melb wins|W = d) EU(AB = yes) = P(R = wins)U(R = wins|AB = yes) +P(W = loses)P(R = loses|AB = yes) = (0.3 × 0.6 + 0.7 × 0.25) × 40 +(0.3 × 0.4 + 0.7 × 0.75) × (−20) = 0.355 × 40 + 0.645 × (−20) = 14.2 − 12.9 = 1.3 EU(AB = no) = P(R = wins)U(R = wins|AB = no) +P(W = loses)P(R = loses|AB = no) = (0.3 × 0.6 + 0.7 × 0.25) × 20 +(0.3 × 0.4 + 0.7 × 0.75) × (−5) = 0.355 × 20 + 0.645 × (−5) = 7.1 − 3.225 = 3.875

Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 11 / 30

slide-12
SLIDE 12

Information Links

Indicate when a chance node needs to be observed before a decision is made.

0.60 0.25 0.15 0.40 0.10 0.50 Accept Bet yes no no rainy sunny rainy cloudy sunny cloudy Weather U Information link W F P(F|W) dry wet Forecast Result

Accept Bet

Decision Table F cloudy rainy sunny

Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 12 / 30

slide-13
SLIDE 13

Decision Table Algorithm

1 Add any available evidence. 2 For each combination of values of the parents of the decision node: 1

For each action value in the decision node:

1

Set the decision node to that value;

2

Calculate the posterior probabilities for the parent nodes of the utility node, as for Bayesian networks, using a standard inference algorithm;

3

Calculate the resulting expected utility for the action.

2

Record the action with the highest expected utility in the decision table.

3 Return the decision table. Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 13 / 30

slide-14
SLIDE 14

Outline

1

Introduction

2

Decision networks Decision networks with intervening actions Dynamic Belief Networks

3

Summary

Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 14 / 30

slide-15
SLIDE 15

Fever problem description

Example Suppose that you know that a fever can be caused by the flu. You can use a thermometer, which is fairly reliable, to test whether or not you have a

  • fever. Suppose you also know that if you take aspirin it will almost

certainly lower a fever to normal. Some people (about 5% of the population) have a negative reaction to aspirin. You’ll be happy to get rid

  • f your fever, as long as you don’t suffer an adverse reaction if you take

aspirin.

Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 15 / 30

slide-16
SLIDE 16

Fever decision network

P(Fe=T|Flu) 0.95 0.02 P(R=T|TA) 0.05 0.00 R yes no yes no U(FL,R) −50 −10 −30 TA yes no yes no 0.05 0.90 0.01 0.02 P(FL|F,TA) P(Th=T|Fever) 0.90 0.05 50 P(Flu=T) 0.05

Flu

T T F F

Reaction

T T F F FL T F Flu

Fever Therm Take U

F T TA F T F Fever

FeverLater Aspirin

Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 16 / 30

slide-17
SLIDE 17

Fever decision table

Evidence Bel(FLater = T) EU(TA = yes) EU(TA = no) Decision None 0.046 45.27 45.29 no Th=F 0.525 45.41 48.41 no Th=T 0.273 44.1 19.13 yes Th=T & 0.273

  • 30.32

no Reation=T

Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 17 / 30

slide-18
SLIDE 18

Types of actions

(a) (b) D U X X D U

(a) Non-intervening and (b) Intervening

Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 18 / 30

slide-19
SLIDE 19

Outline

1

Introduction

2

Decision networks Decision networks with intervening actions Dynamic Belief Networks

3

Summary

Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 19 / 30

slide-20
SLIDE 20

Sequential decision making

Precedence links used to show temporal ordering. Network for a test-action decision sequence

X

Precedence link Information link

Action U Obs Test Cost

Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 20 / 30

slide-21
SLIDE 21

Dynamic Bayesian networks

Next time t+1 Previous time t−1 Current time t intra−slice arcs inter−slice arcs

t−1

Xt−1 Xt−1 X Xj

i n t−1 1 t

Xt Xt X Xj

i n t 1 t+1

Xt+1 Xt+1 X Xj

i n t+1 1 t+2

Xt+2 Xt+2 X Xj

i n t+2 1

t+2

One node for each variable for each time step. Intra-slice arcs: X T

i

→ X T

j

Inter-slice (temporal) arcs X T

i

→ X t+1

i

X T

i

→ X t+1

j

Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 21 / 30

slide-22
SLIDE 22

Fever dynamic Bayesian network

React t Reactt+1 Flu Flut+1

t+1

Th At

t t

Th Fevert

t+1

Fever At+1

Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 22 / 30

slide-23
SLIDE 23

DBN reasoning

Can calculate distributions for St+1 and further: probabilistic projection. Reasoning can be done using standard BN updating algorithms This type of DBN gets very large, very quickly. Usually only keep two time slices of the network.

Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 23 / 30

slide-24
SLIDE 24

Dynamic Decision Network

U Xt+1 Xt+n Obs Obs Obs Obs

t+n t+n t−1 t t−1 t−1

D D

t+1

D D

t

Xt X

t+1

Similarly, Decision Networks can be extended to include temporal aspects. Sequence of decisions taken = Plan.

Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 24 / 30

slide-25
SLIDE 25

Fever Dynamic Decision Network

U Th Flu Th React t

t+1

React

t+1 t t t+1

Flu

t t t+1 t+1

Fever Fever A A

Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 25 / 30

slide-26
SLIDE 26

Uses of Bayesian Networks

Calculating the belief in query variables given values for evidence variables (above). Predicting values in dependent variables given values for independent variables. Modeling causal interventions. Decision making based on probabilities in the network and on the agent’s utilities (Influence Diagrams [Howard and Matheson 1981]). Deciding which additional evidence should be observed in order to gain useful information. Sensitivity analysis to test impact of changes in probabilities or utilities on decisions.

Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 26 / 30

slide-27
SLIDE 27

Outline

1

Introduction

2

Decision networks Decision networks with intervening actions Dynamic Belief Networks

3

Summary

Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 27 / 30

slide-28
SLIDE 28

Summary

BNs can be extended with decision nodes and utility nodes to support decision making: Decision Networks or Influence Diagrams. BNs and decision networks can be extended to allow explicit reasoning about changes over time.

Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 28 / 30

slide-29
SLIDE 29

Acknowledgments

Lecture 8 is extracted from http://www.csse.monash.edu.au/courseware/cse458/L3-4.pdf, and composed of materials from [Korb and Nicholson, 2003, Chapter 4] and [Jensen and Nielsen, 2007, Chapter 9] with the instructor’s own interpretations. The instructor takes full responsibility of any mistakes in the slides.

Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 29 / 30

slide-30
SLIDE 30

References I

Finn V. Jensen and Thomas D. Nielsen. Bayesian Networks and Decision Graphs. Springer Publishing Company, Incorporated, 2007.

  • K. Korb and A. E. Nicholson.

Bayesian Artificial Intelligence. Chapman & Hall /CRC, 2003.

Yuqing Tang (CUNY - GC, BC) Expert systems: Lecture 8 30 / 30