Introduction to Bayesian Networks Alice Gao Lecture 10 Based on - - PowerPoint PPT Presentation

introduction to bayesian networks
SMART_READER_LITE
LIVE PREVIEW

Introduction to Bayesian Networks Alice Gao Lecture 10 Based on - - PowerPoint PPT Presentation

1/32 Introduction to Bayesian Networks Alice Gao Lecture 10 Based on work by K. Leyton-Brown, K. Larson, and P. van Beek 2/32 Outline Learning Goals Examples of Bayesian Networks Semantics of Bayes Net Representing the joint distribution


slide-1
SLIDE 1

1/32

Introduction to Bayesian Networks

Alice Gao

Lecture 10 Based on work by K. Leyton-Brown, K. Larson, and P. van Beek

slide-2
SLIDE 2

2/32

Outline

Learning Goals Examples of Bayesian Networks Semantics of Bayes Net Representing the joint distribution Encoding the conditional independence assumptions Constructing Bayes Nets Revisiting the Learning goals

slide-3
SLIDE 3

3/32

Learning Goals

By the end of the lecture, you should be able to

▶ Compute a joint probability given a Bayesian network. ▶ Identify the conditional independence assumptions of a

Bayesian network.

▶ Given a Bayesian network, determine if two variables are

independent or conditionally independent given a third variable.

slide-4
SLIDE 4

4/32

Inheritance of Handedness

GMother GFather HMother HFather GChild HChild

slide-5
SLIDE 5

5/32

Car Diagnostic Network

Battery Radio Ignition Gas Starts Moves

slide-6
SLIDE 6

6/32

Example: Nuclear power plant operations

Situations & root causes Events Sensor outputs & reports Loss of coolant accident Steam generator tube rupture Other Loss of secondary coolant

Emergency

Pressurizer pressure Steam line radiation Steam generator level Pressurizer indicator Steam line radiation alarm Steam generator indicator

slide-7
SLIDE 7

7/32

Example: Fire alarms

Situations & root causes Events Sensor outputs & reports

Fire Tampering Alarm Smoke

Leaving Building

Report

Report: “report of people leaving building because a fire alarm went off”

slide-8
SLIDE 8

8/32

Example: Medical diagnosis of diabetes

Dspnea

Patient information & root causes Medical difficulties & diseases Diagnostic tests & symptoms

Pregnancies Heridity Overweight Age Exercise Gender Diabetes

Glucose conc.

Serum test Diastolic BP Fatigue BMI

slide-9
SLIDE 9

9/32

Why Bayesian Networks?

A probabilistic model of the Holmes scenario:

▶ The random variables: Earthquake, Radio, Burglary, Alarm,

Watson, and Gibbon.

▶ # of probabilities in the joint distribution: 26 = 64. ▶ For example,

P(E ∧ R ∧ B ∧ A ∧ W ∧ G) =? P(E ∧ R ∧ B ∧ A ∧ W ∧ ¬G) =? ... etc ... We can answer any question about the domain using the joint distribution, but

▶ Quickly become intractable as the number of variables grows. ▶ Unnatural and tedious to specify all the probabilities.

slide-10
SLIDE 10

10/32

Why Bayesian Networks?

A Bayesian Network is a compact version of the joint distribution and it takes advantage of the unconditional and conditional independence among the variables.

slide-11
SLIDE 11

11/32

A Bayesian Network for the Holmes Scenario

slide-12
SLIDE 12

12/32

Bayesian Network

A Bayesian Network is a directed acyclic graph.

▶ Each node corresponds to a random variable. ▶ X is a parent of Y if there is an arrow from node X to node Y.

The graph has no directed cycles.

▶ Each node Xi has a conditional probability distribution

P(Xi|Parents(Xi)) that quantifjes the efgect of the parents on the node.

slide-13
SLIDE 13

13/32

Learning Goals Examples of Bayesian Networks Semantics of Bayes Net Representing the joint distribution Encoding the conditional independence assumptions Constructing Bayes Nets Revisiting the Learning goals

slide-14
SLIDE 14

14/32

The Semantics of Bayesian Networks

Two ways to understand Bayesian Networks:

▶ A representation of the joint probability distribution ▶ An encoding of the conditional independence assumptions

slide-15
SLIDE 15

15/32

Representing the joint distribution

We can calculate every entry in the joint distribution using the Bayesian Network. How do we do this?

  • 1. Choose an order of the variables that is consistent with the

partial ordering of the nodes in the Bayesian Network.

  • 2. Compute the joint probability using the following formula.

P(Xn, . . . , X1) =

n

i=1

P(Xi|Parents(Xi))

slide-16
SLIDE 16

16/32

Representing the joint distribution

Example: What is the probability that

▶ The alarm has sounded, ▶ Neither a burglary nor an earthquake has occurred, ▶ Both Watson and Gibbon call and say they hear the alarm,

and

▶ There is no radio report of an earthquake?

slide-17
SLIDE 17

17/32

CQ: Calculating the joint probability

CQ: What is the probability that

▶ NEITHER a burglary NOR an earthquake has occurred, ▶ The alarm has NOT sounded, ▶ NEITHER of Watson and Gibbon is calling, and ▶ There is NO radio report of an earthquake?

(A) 0 ≤ p ≤ 0.2 (B) 0.2 < p ≤ 0.4 (C) 0.4 < p ≤ 0.6 (D) 0.6 < p ≤ 0.8 (E) 0.8 < p ≤ 1

slide-18
SLIDE 18

18/32

Encoding the Conditional Independent Assumptions

By modeling a domain using a Bayesian network, we are making the following key assumption. For a given ordering of the nodes, each node is conditionally independent of its predecessors given its parents. P(Xi|Parents(Xi)) = P(Xi|Xi−1, . . . , X1), ∀i = 1, . . . , n

slide-19
SLIDE 19

19/32

Identifying the Conditional Independence Assumptions

Given a Bayesian Network,

▶ Consider all orderings of the variables that are consistent with

the partial ordering in the Bayesian network.

▶ Based on the Bayesian Network,

P(Xn, . . . , X1) =

n

i=1

P(Xi|Parents(Xi)) Based on the chain rule, P(Xn, . . . , X1) =

n

i=1

P(Xi|Xi−1, . . . , X1)

▶ The difgerence between the RHS of the equations give the

conditional independence assumptions.

slide-20
SLIDE 20

20/32

CQ: Independence and Conditional Independence

Burglary Alarm Watson CQ: True or False.

  • 1. Watson is independent of Burglary.
  • 2. Watson is conditionally independent of Burglary given Alarm.

(A) Both True (B) Both False (C) (1) is True and (2) is False. (D) (1) is False and (2) is True.

slide-21
SLIDE 21

21/32

CQ: Independence and Conditional Independence

Alarm Watson Gibbon CQ: True or False.

  • 1. Watson is independent of Gibbon.
  • 2. Watson is conditionally independent of Gibbon given Alarm.

(A) Both True (B) Both False (C) (1) is True and (2) is False. (D) (1) is False and (2) is True.

slide-22
SLIDE 22

22/32

CQ: Independence and Conditional Independence

Alarm Earthquake Burglary CQ: True or False.

  • 1. Burglary is independent of Earthquake.
  • 2. Burglary is conditionally independent of Earthquake given

Alarm. (A) Both True (B) Both False (C) (1) is True and (2) is False. (D) (1) is False and (2) is True.

slide-23
SLIDE 23

23/32

CQ: Conditional Independence

CQ: Is Radio conditionally independent of Gibbon given Earthquake? (A) Yes (B) No (C) I don’t know.

slide-24
SLIDE 24

24/32

CQ: Conditional Independence

CQ: Is Radio conditionally independent of Burglary given Alarm? (A) Yes (B) No (C) I don’t know.

slide-25
SLIDE 25

25/32

Constructing Bayes Nets

Two questions to consider

▶ Given a Bayesian network, is it a correct and good

representation of the domain?

▶ How do we construct a Bayesian network that is a correct and

good representation of the domain?

slide-26
SLIDE 26

26/32

Correct and Good Bayes Networks

A Bayes network is a correct representation of the domain ifg

▶ it makes the correct independence assumptions.

Among all the correct Bayes network representations, a Bayes network is a good representation of the domain ifg

▶ the number of required probabilities is relatively small, and ▶ the probabilities required are natural to specify.

slide-27
SLIDE 27

27/32

Constructing a Correct Bayesian Network

  • 1. Determine the set of variables that are required to model the

domain.

  • 2. Order the variables, {X1, ..., Xn}.
  • 3. For i = 1 to n, do the following

3.1 Choose a minimum set of parents from X1, ..., Xi−1 such that P(Xi|Parents(Xi)) = P(Xi|Xi−1, . . . , X1) is satisfjed. 3.2 Create a link from each parent of Xi to Xi. 3.3 Write down the conditional probability table P(Xi|Parents(Xi)).

slide-28
SLIDE 28

28/32

Example: Construct a Bayes Net

Construct a correct Bayesian network using the following ordering. (Let’s drop Radio.) B, E, A, W, G

slide-29
SLIDE 29

29/32

Example: Construct a Bayes Net

Construct a correct Bayesian network using the following ordering. (Let’s drop Radio.) W, G, A, B, E

slide-30
SLIDE 30

30/32

CQ Is this Bayes Net correct?

CQ: Consider the node ordering: W, G, A, B, E. Is the following Bayesian network a correct representation of the domain? W

❅ ❅ ❅ ❅ ❅ ❅ ❅

B A

❄ ❄ ❄ ❄ ❄ ❄ ❄

⑧ ⑧ ⑧ ⑧ ⑧ ⑧ ⑧

G

⑦ ⑦ ⑦ ⑦ ⑦ ⑦ ⑦

E Hint: In our domain, Watson and Gibbon are not independent of each other. What about in this network? (A) Yes (B) No (C) I don’t know.

slide-31
SLIDE 31

31/32

Exercise: Construct a Bayes Net

Construct a correct Bayesian network using the following ordering. W, G, E, B, A

slide-32
SLIDE 32

32/32

Revisiting the Learning Goals

By the end of the lecture, you should be able to

▶ Compute a joint probability given a Bayesian network. ▶ Identify the conditional independence assumptions of a

Bayesian network.

▶ Given a Bayesian network, determine if two variables are

independent or conditionally independent given a third variable.