uncertainty & bayesian belief networks

48
ertainty & Bayesian Belief Netw

Upload: stephanie-gutierrez

Post on 01-Jan-2016

52 views

Category:

Documents


0 download

DESCRIPTION

Uncertainty & Bayesian Belief Networks. Data-Mining with Bayesian Networks on the Internet. Internet can be seen as a massive repository of Data Data is often updated Once meaningful data has been collected from the Internet, some model is needed which is able to: - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Uncertainty & Bayesian Belief Networks

Uncertainty & Bayesian Belief Networks

Page 2: Uncertainty & Bayesian Belief Networks

2

Data-Mining with Bayesian Networks on the Internet

• Internet can be seen as a massive repository of Data

• Data is often updated

• Once meaningful data has been collected from the Internet, some model is needed which is able to:– be learnt from the vast amount of available data– enable the user to reason about the data.– Be easily updated given new data

Page 3: Uncertainty & Bayesian Belief Networks

3

Section 1 - Bayesian Networks An Introduction

• Brief Summary of Expert Systems• Causal Reasoning• Probability Theory• Bayesian Networks - Definition, inference• Current issues in Bayesian Networks• Other Approaches to Uncertainty

Page 4: Uncertainty & Bayesian Belief Networks

4

Expert Systems1 Rule Based Systems

• 1960s - Rule Based Systems• Model human Expertise using IF .. THEN rules or

Production Rules.• Combines the rules (or Knowledge Base) with an

inference engine to reason about the world.• Given certain observations, produces conclusions.• Relatively successful but limited.

Page 5: Uncertainty & Bayesian Belief Networks

5

2 Uncertainty

• Rule based systems failed to handle uncertainty • Only dealt with true or false facts• Partly overcome using Certainty factors• However, other problems: no differentiation

between causal rules and diagnostic rules.

Page 6: Uncertainty & Bayesian Belief Networks

6

3 Normative Expert Systems

• Model Domain rather than Expert• Classical probability used rather than ad-hoc

calculus• Expert support rather than Expert Model• 1980s - More Powerful Computers make complex

probability calculations feasible• Bayesian Networks introduced (Pearl 1986) e.g.

MUNIN.

Page 7: Uncertainty & Bayesian Belief Networks

7

Causality - 1 Icy Roads

Icy Roads

Holmes Crashes Watson Crashes

Page 8: Uncertainty & Bayesian Belief Networks

8

- 2 Wet Grass

Rain

Watson’s Grass Wet

Holmes’Grass Wet

Sprinkler

Page 9: Uncertainty & Bayesian Belief Networks

9

- 3 Earthquake or Burglar

Alarm

Mary Calls John Calls

Burglary Earthquake

Page 10: Uncertainty & Bayesian Belief Networks

10

Tour through Probability

• All probabilities are between 0 and 1

• Necessarily true propositions have probability=1 and necessarily false propositions have probability=0

Page 11: Uncertainty & Bayesian Belief Networks

11

Conjunctions and Disjunctions

• P(A & B) = P(A) x P(B)

• P(A v B) = P(A) + P(B)

(mutually exclusive)

• P(A v B)=P(A)+P(B) - P(A & B)

(not mutually exclusive)

A B

A B

Venn Diagrams

A B

Page 12: Uncertainty & Bayesian Belief Networks

12

Conditional probability & independence

• Probability of B “given” A:

• Independence:

P(B|A)=P(A&B) P(A)E.g. P(Hearts|Heart last time)

E.g. P(Heads|Even) = P(Heads)P(B|A)=P(B)

Page 13: Uncertainty & Bayesian Belief Networks

13

Probability Distributions

• Probability Distribution:

– p(Weather=Sunny) = 0.5

– p(Weather=Rain)= 0.2

– p(Weather=Cloud)= 0.2

– p(Weather=Snow)= 0.1

• NB Distribution sums to 1.

0.5

0.2

0.1

S R C S

Page 14: Uncertainty & Bayesian Belief Networks

14

Joint Probability

• Completely specifies all beliefs in a problem domain.

• Joint prob Distribution is an n-dimensional table with a probability in each cell of that state occurring.

• Written as P(X1, X2, X3 …, Xn)

• When instantiated as P(x1,x2 …, xn)

Page 15: Uncertainty & Bayesian Belief Networks

15

Joint Distribution Example

• Domain with 2 variables each of which can take on 2 states.

Toothache ¬Toothache

Cavity 0.04 0.06

¬Cavity 0.01 0.89

P(Toothache, Cavity)

Page 16: Uncertainty & Bayesian Belief Networks

16

Bayes’ Theorem

Simple:

P(Y|X) = P(X|Y)P(Y) P(X)

General: P(Y|X,E) = P(X|Y,E)P(Y|E) P(X|E)

Page 17: Uncertainty & Bayesian Belief Networks

17

Bayesian Probability

• No need for repeated Trials

• Appear to follow rules of Classical Probability

• How well do we assign probabilities?

The Probability Wheel:A Tool for Assessing Probabilities

Page 18: Uncertainty & Bayesian Belief Networks

18

Bayesian Network - Definition

• Causal Structure• Interconnected Nodes• Directed Acyclic Links• Joint Distribution formed

from conditional distributions at each node.

Page 19: Uncertainty & Bayesian Belief Networks

19

Earthquake or Burglar

Alarm

Mary Calls John Calls

Burglary Earthquake

Page 20: Uncertainty & Bayesian Belief Networks

20

Bayesian Network for Alarm Domain

Alarm

Mary Calls John Calls

P(B) P(E).001 .002

B E P(A)T T .95T F .94F T .29F F .001

A P(J)A P(M)T .70F .01

T .90F .05

Burglary Earthquake

Page 21: Uncertainty & Bayesian Belief Networks

21

Retrieving Probabilities from the Conditional Distributions

• P(x1,…xn) = P(xi|Parents(xi))

• E.g.

P(J & M & A & ¬B & ¬E)

= P(J|A)P(M|A)P(A|¬B,¬E)P(¬B)P(¬E)

= 0.9 x 0.7 x 0.001 x 0.999 x 0.998

= 0.00062

i=1

n

Page 22: Uncertainty & Bayesian Belief Networks

22

Constructing A Network

- Node Ordering and Compactness

• Mary Calls• John Calls• Alarm• Burglary• Earthquake

Mary Calls

Alarm

Burglary

John Calls

Earthquake

Page 23: Uncertainty & Bayesian Belief Networks

23

Node Ordering and Compactness contd.

• Mary Calls• Johns Calls• Earthquake• Burglary• Alarm

Page 24: Uncertainty & Bayesian Belief Networks

24

Node Ordering and Compactness contd.

• Mary Calls• Johns Calls• Earthquake• Burglary• Alarm

Mary Calls

Earthquake

Burglary

John Calls

Alarm

Page 25: Uncertainty & Bayesian Belief Networks

25

Conditional Independence revisited - D-Separation

• To do inference in a Belief Network we have to know if two sets of variables are conditionally independent given a set of evidence.

• Method to do this is called Direction-Dependent Separation or D-Separation.

Page 26: Uncertainty & Bayesian Belief Networks

26

D-Separation contd.

• 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 given E.

• X is a set of variables with unknown values• Y is a set of variables with unknown values• E is a set of variables with known values.

Page 27: Uncertainty & Bayesian Belief Networks

27

D-Separation contd.

• A set of nodes, E, d-separates two sets of nodes, 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:1) Z is in E and Z has one arrow leading in and one leading out.

2) Z is in E and has both arrows leading out.

3) Neither Z nor any descendant of Z is in E and both path arrows lead in to Z.

Page 28: Uncertainty & Bayesian Belief Networks

28

Blocking

Z

Z

Z

X YE

Page 29: Uncertainty & Bayesian Belief Networks

29

D-Separation - Example

• Moves and Battery are independent given it is known about Ignition

• Moves and Radio are independent if it is known that Battery works

• Petrol and Radio are independent given no evidence. But are dependent given evidence of Starts

Radio Ignition

Petrol

Starts

Moves

Battery

Page 30: Uncertainty & Bayesian Belief Networks

30

Inference

• Diagnostic Inferences (effects to causes)

• Causal Inferences (causes to effects)

• Intercausal Inferences - or ‘Explaining Away’ (between causes of common effect)

• Mixed Inferences (combination of two or more of the above)

Page 31: Uncertainty & Bayesian Belief Networks

31

Inference contd.

E

Q

Q

E Q E

E

Q

E

Diagnostic Causal Intercausal Mixed

Page 32: Uncertainty & Bayesian Belief Networks

32

Inference contd.

Burglary

Alarm

Mary Calls

Earthquake

John Calls

Page 33: Uncertainty & Bayesian Belief Networks

33

Inference in Singly Connected Networks

• E.g. P(X|E):

Involves computing two values:– Causal Support (evidence variables above X

connected through it’s parents)– Evidential Support (evidence variables below X

connected through it’s children

• Algorithm can perform in Linear Time.

Page 34: Uncertainty & Bayesian Belief Networks

34

Inference Algorithm

E

Q

Spreads out from Q to evidence nodes, root nodes and leaf nodes.

Each recursive call excludes the node fromwhich it was called.

Causal Support

Evidential SupportE

E

Page 35: Uncertainty & Bayesian Belief Networks

35

Inference in Multiply Connected Networks

• Exact Inference is known to be NP-Hard

• Approaches include:– Clustering– Conditioning– Stochastic Simulation

• Stochastic Simulation is most often used, particularly on large networks.

Page 36: Uncertainty & Bayesian Belief Networks

36

Clustering

Sprinkler & Rain

Wet Grass

C TT TF FT FF

T .08 .02 .72 .18F .40 .10 .40 .10

P(S&R)

Sprinkler Rain

Wet Grass

C P(R)

T .08 .02F .40 .10

C P(S)

T .08 .02F .40 .10

Cloudy Cloudy

Page 37: Uncertainty & Bayesian Belief Networks

37

ConditioningCloudy

Sprinkler Rain

Wet Grass

Cloudy Cloudy

Sprinkler Rain

Wet Grass

Cloudy+-

+-

Page 38: Uncertainty & Bayesian Belief Networks

38

Stochastic Simulation - Example

A

B C

D E

P(A=1) = 0.2

A P(B=1)0 0.21 0.8

A p(C=1)0 0.051 0.2

Page 39: Uncertainty & Bayesian Belief Networks

39

Stochastic SimulationRun repeated simulations to estimate the probability

distribution• Let Wx = the states of all other variables except x.

• Let the Markov Blanket of a node be all of its parents, children and parents of children.

• Distribution of each node, x, conditioned upon Wx can be computed locally from their own probability with their children’s :

• P(a|Wa) = . P(a) . P(b|a) . P(c|a)

• P(b|Wb) = . P(b|a) . P(d|b,c)

• P(c|Wc) = . P(c|a) . P(d|b,c) . P(e|c)

• Therefore, only the Markov blanket of a node is required to compute the distribution

Page 40: Uncertainty & Bayesian Belief Networks

40

• Set all observed nodes to their values

• Set all other nodes to random values

• STEP 1

• Select a node randomly from the network

• According to the states of the node’s markov blanket, compute P(x=state, Wx) for all states

• STEP 2

• Use a random number generator that is biased according to the distribution computed in step 1 to select the next value of the node

• Repeat

The Algorithm

Page 41: Uncertainty & Bayesian Belief Networks

41

Algorithm contd.

• The final probability distribution of each unobserved node is calculated from either:

1) the number of times each node took a particular state

2) the average conditional probability of each node taking a particular state given the other variables states.

Page 42: Uncertainty & Bayesian Belief Networks

42

Case Study - Pathfinder

• Diagnostic Expert System for Lymph-Node Diseases

4 Versions of Pathfinder :

1) Rule Based

2) Experimented with Certainty Factors/Dempster-Shafer theory/Bayesian Models

3) Refined Probabilities

4) Refined dependencies

Page 43: Uncertainty & Bayesian Belief Networks

43

Section 2 - Research Issues in Uncertainty

• Assume no Knowledge of Probabilities Distributions or Causal Structure.

• Is it possible to infer both of these from data?

Case Fraud Gas Jewellery Age Sex

1 No No No 30-50 F 2 No No No 30-50 M 3 Yes Yes Yes >50 M 4 No No No 30-50 M 5 No Yes No <30 F 6 No No No <30 F 7 No No No >50 M 8 No No Yes 30-50 F 9 No Yes No <30 M 10 No No No <30 F

1 Learning Belief Networks from Data

Page 44: Uncertainty & Bayesian Belief Networks

44

Some Methods

• Bayesian (Cooper & Herskovitz 1991)

• Minimum Description Length (Lam & Bachus 1994)

• Bound and Collapse (Ramoni 1996)

Fraud

Gas Jewelry

Age Sex

Page 45: Uncertainty & Bayesian Belief Networks

45

2 Dynamics - Markov Models

State t-2 State t-1 State t State t+1 State t+2

Percept t-2 Percept t-1 Percept t Percept t+1 Percept t+2

Sensor Model

State Transition Model

Page 46: Uncertainty & Bayesian Belief Networks

46

Updating over time

State t

Percept t

State t State t+1

Percept t Percept t+1

State t-1 State t

Percept t-1 Percept t

Page 47: Uncertainty & Bayesian Belief Networks

47

Dynamic Belief Networks - Forecasting Car sales

Demand Health

Supply

Price

Demand Health

Supply

Price

tt-1

Page 48: Uncertainty & Bayesian Belief Networks

48

3 Other approaches to modeling Uncertainty

• Default Reasoning

• Dempster - Shafer Theory

• Fuzzy Logic ?