modelling uncertainty

Post on 01-Jan-2016

36 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Modelling uncertainty. Probability of an event. Classical method : If an experiment has n possible outcomes assign a probability of 1/ n to each experimental outcome. Relative frequency method : Probability is the relative frequency of the number of events satisfying the constraints. - PowerPoint PPT Presentation

TRANSCRIPT

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/1

Modelling uncertainty

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/2

Probability of an event

• Classical method: If an experiment has n possible outcomes assign a probability of 1/n to each experimental outcome.

• Relative frequency method:Probability is the relative frequency of the number of events satisfying the constraints.

• Subjective method:Probability is a number characterising the likelihood of an event – degree of belief

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/3

Axioms of the probability theory

Axiom I The probability value assigned to each experimental outcome must be between 0 and 1.

Axiom II The sum of all the experimental outcome probabilities must be 1.

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/4

Conditional probability

denoted by P(A|B) expresses belief that event A is true assuming that event B is true (events A and B are dependent)

Definition

Let the probability of event B be positive. Conditional probability of event A under condition B is calculated as follows:

0P(B) re whe,P(B)

B)P(A,B)|P(A

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/5

Joint probability

If events A1, A2,... Are mutually exclusive and cover the

sample space , and P(Ai) > 0 for i = 1, 2,... then for any

event B the following equality holds:

i

ii ))P(AA|P(BP(B)

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/6

Bayes’ Theorem

If the events A1, A2,... fulfil the assumptions of the joint

probability theorem, and P(B) > 0, then for i =1, 2,... The

following equality holds:

iii

iii ))P(AA|P(B

))P(AA|P(BB)|P(A

Thomas Bayes (1701-1761)

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/7

Bayes’ Theorem

Let us denote:

H – hipothesis

E – evidence

The Bayes’ rule has the form:

P(E)H)P(H)|P(E

E)|P(H

Prior probabilities

New information

Bayes’ theorem

Posterior probabilities

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/8

Difficulties with joint probability distribution (tabular approach)

• the joint probability distribution has to be defined and stored in memory

• high computational effort required to calculate marginal and conditional probabilities

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/9

B E A J M P(B,E,A,J,M)1 1 1 1 1 0,00011970001 1 1 1 0 0,00001330001 1 1 0 1 0,00005130001 1 1 0 0 0,00000570001 1 0 1 1 0,00000000501 1 0 1 0 0,00000009501 1 0 0 1 0,00000049501 1 0 0 0 0,00000940501 0 1 1 1 0,00580356001 0 1 1 0 0,00064484001 0 1 0 1 0,00248724001 0 1 0 0 0,00027636001 0 0 1 1 0,00000029401 0 0 1 0 0,00000558601 0 0 0 1 0,00002910601 0 0 0 0 0,00055301400 1 1 1 1 0,00361746000 1 1 1 0 0,00040194000 1 1 0 1 0,00155034000 1 1 0 0 0,00017226000 1 0 1 1 0,00000702900 1 0 1 0 0,00013355100 1 0 0 1 0,00069587100 1 0 0 0 0,01322154900 0 1 1 1 0,00061122600 0 1 1 0 0,00006791400 0 1 0 1 0,00026195400 0 1 0 0 0,00002910600 0 0 1 1 0,00048461490 0 0 1 0 0,00920768310 0 0 0 1 0,0479768751

n sample points

2n probabilities

P(B,M)

P(M)

M)P(B,M)|P(B

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/11

Certainty factor

• Buchanan, Shortliffe 1975• Model developed for the rule expert system

MYCIN

If E then H

evidence (observation)

hipothesis

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/12

Belief

othewise

1P(H) if

P(H)max{1,0}

P(H)P(H)}E),|max{P(H

1

E]MB[H,

• MB[H, E] – measure of the increase of belief that H is true based on observation E.

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/13

Disbelief

• MD[H, E] – measure of the increase of disbelief that H is true based on observation E.

otherwise

0P(H) if

P(H)min{1,0}

P(H)P(H)}E),|min{P(H

1

E]MD[H,

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/14

Certainty factor

E]MD[H,E]MB[H,E)CF(H,

CF [–1, 1]

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/15

Interpretation of the certainty factor

Certainty factor is associated with a rule:

If evidence then hipothesis

and denotes the change in belief that H is true after observation E.

E HCF(H, E)

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/16

Uncertainty propagation

E1

H

CF(H, E1)

E2 CF(H, E2)

Parallel rules

E1, E2 HCF(H, E1&E2)

otherwise )]E MB(H,[1-*)E MB(H,)E MB(H,

1)E&EMD(H, if

)E&EMB(H,

121

21

21

0

otherwise )]E MD(H,[1-*)E MD(H,)E MD(H,

1)E&EMB(H, if

)E&EMD(H,

121

21

21

0

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/17

Uncertainty propagation

E1 HCF(E2, E1)

E2

CF(H, E2)

Serial rules

E1 HCF(H, E1)

otherwise )E)CF(H,E,CF(E

0)E,CF(E if )E)CF(H,E,CF(E)ECF(H,

212

122121

If CF(H,E2) is not defined, it is assumed to be 0.

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/18

Certainty factor – probabilistic definition

Heckerman 1986

E)|P(HP(H)gdy E))|P(HP(H)(1

P(H)E)|P(H

P(H)E)|P(Hgdy P(H))E)(1|P(HP(H)E)|P(H

E)CF(H,

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/19

Certainty measure

E HCF(H, E)

C(E) C(H)

0H)(EC(H)CF' if |}H)(ECF'|,|C(H)min{|1

H)(ECF'C(H)

0H)(ECF'C(H), if H)(EC(H))CF'(1C(H)

0H)(ECF'C(H), if H)(EC(H))CF'(1C(H)

(H)C'

C(E)}max{0,H)CF(EH)(ECF'

Grzymała-Busse 1991

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/20

Example 1

C(s1 s2) = min(0,2; – 0,1) = – 0,1

CF’(h, s1 s2) = 0,4 * 0 = 0

s1h

CF(h, s1 s2) = 0,4

s2

C(s1) = 0,2

C(s2) = – 0,1C(h) = 0,3

C’(h) = 0,3 + (1– 0,3) * 0 = 0,3 + 0 = 0,3

0H)(ECF'C(H), if H)(EC(H))CF'(1C(H)(H)C'

C(E)}max{0,H)CF(EH)(ECF'

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/21

Example 2

C(s1 s2) = min(0,2; 0,8) = 0,2

CF’(h, s1 s2) = 0,4 * 0,2 = 0,08

s1h

CF(h, s1 s2) = 0,4

s2

C(s1) = 0,2

C(s2) = 0,8C(h) = 0,3

C’(h) = 0,3 + (1– 0,3) * 0,08 = 0,3 + 0,7 * 0,08 = 0,356

0H)(ECF'C(H), if H)(EC(H))CF'(1C(H)(H)C'

C(E)}max{0,H)CF(EH)(ECF'

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/22

Dempster-Shafer theory

Each hipothesis is characterised by two values: balief and plausibility.

It models not only belief, but also the amount of acquired information.

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/23

Density probability function

ΘA

Θ

1m(A)

0]m[

0,12 :m

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/24

Belief

Belief Bel [0,1] measures the value of acquired information supporting the belief that the considered set hipothesis is true.

ABm(B)Bel(A)

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/25

Plausibility

Plausibility Pl [0,1] measures how much the belief that A is true is limited by evidence supporting A.

A)Bel(1Pl(A)

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/26

Combining various sources of evidence

Assume two sources of evidence: X and Y represented by

respective subsets of : X1,...,Xm and Y1,...,Yn. Probability

density functions m1 and m2 are defined on X and Y

respectively. Combining observations from two sources a

new value m3(Z) is calculated for each subset of as

follows:

jYiX j2i1

ZjYiX j2i1

3 )(Y)m(Xm1

)(Y)m(Xm

(Z)m

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/27

Example

={A, F, C, P} m1() = 1

Observation 1 m2({A, F, C}) = 0,6

m2() = 0,4

m1() = 1

m2({A, F, C}) = 0,6

m3({A, F, C}) = 0,6

m2() = 0,4

m3() = 0,4

A – allergyF – fluC – coldP - pneumonia

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/28

Example

Observation 2 m4({F,C,P}) = 0,8

m4() = 0,2

m4({F,C,P}) = 0,8

m5({F,C}) = 0,48

m4() = 0,2

m5({A,F,C}) = 0,12

m3({A, F, C}) = 0,6 m3() = 0,4

m3({A,F,C}) = 0,6

m3() = 0,4 m5({F,C,P}) = 0,32 m5() = 0,08

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/29

Example

Observation 3 m6({A}) = 0,75

m6() = 0,25

m6({A}) = 0,75

m7() = 0,36

m6() = 0,25

m7({F,C}) = 0,12

m7({A}) = 0,09 m7({A,F,C}) = 0,03

m5({F,C}) = 0,48 m5({A,F,C}) = 0,12

m5({F,C,P}) = 0,32 m5() = 0,08

m5({F,C}) = 0,48

m5({A,F,C}) = 0,12

m5({F,C,P}) = 0,32

m5() = 0,08

m7() = 0,24 m7({F,C,P}) = 0,08

m7({A}) = 0,06 m7() = 0,02

m7({A}) = 0,15

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/30

Example

Observation 3 m6({A}) = 0,75

m6() = 0,25

m6({A}) = 0,75

m7() = 0,36

m6() = 0,25

m7({F,C}) = 0,12

m7({A}) = 0,09 m7({A,F,C}) = 0,03

m5({F,C}) = 0,48 m5({A,F,C}) = 0,12

m5({F,C,P}) = 0,32 m5() = 0,08

m5({F,C}) = 0,48

m5({A,F,C}) = 0,12

m5({F,C,P}) = 0,32

m5() = 0,08

m7() = 0,24 m7({F,C,P}) = 0,08

m7({A}) = 0,06 m7() = 0,02

m7() = 0,6

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/31

Example

m7({F,C}) = 0,12

m7({A}) = 0,15

m7({A,F,C}) = 0,03

m7({F,C,P}) = 0,08

m7() = 0,02

m7({F,C}) = 0,3

m7({A}) = 0,375

m7({A,F,C}) = 0,075

m7({F,C,P}) = 0,2

m7() = 0,05

{A}: [0,375, 0,500]

{F}: [0, 0,625]

{C}: [0, 0,625]

{P}: [0, 0,250]

1 – 0,3 – 0,2

1 – 0,375

1 – 0,375 – 0,3 – 0,075

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/32

Fuzzy sets (Zadeh)

Rough sets (Pawlak)

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/33

Probabilistic reasoning

alarm

earthquakeburglary

John Mary

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/34

Probabilistic reasoning

B – burglary

E – earthquake

A – alarm

J – John calls

M – Mary calls

Joint probability distribution – P(B,E,A,J,M)

?

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/35

Joint probability distribution

B E A J M P(B,E,A,J,M)1 1 1 1 1 0,00011970001 1 1 1 0 0,00001330001 1 1 0 1 0,00005130001 1 1 0 0 0,00000570001 1 0 1 1 0,00000000501 1 0 1 0 0,00000009501 1 0 0 1 0,00000049501 1 0 0 0 0,00000940501 0 1 1 1 0,00580356001 0 1 1 0 0,00064484001 0 1 0 1 0,00248724001 0 1 0 0 0,00027636001 0 0 1 1 0,00000029401 0 0 1 0 0,00000558601 0 0 0 1 0,00002910601 0 0 0 0 0,00055301400 1 1 1 1 0,00361746000 1 1 1 0 0,00040194000 1 1 0 1 0,00155034000 1 1 0 0 0,00017226000 1 0 1 1 0,00000702900 1 0 1 0 0,00013355100 1 0 0 1 0,00069587100 1 0 0 0 0,01322154900 0 1 1 1 0,00061122600 0 1 1 0 0,00006791400 0 1 0 1 0,00026195400 0 1 0 0 0,00002910600 0 0 1 1 0,00048461490 0 0 1 0 0,00920768310 0 0 0 1 0,0479768751

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/36

Probabilistic reasoning

What is the probability of a burglary if Mary called? P(B=y|M=y) ?

JE,A,

M)J,A,E,P(B,M)P(B,

Marginal probability:

Conditional probability:

0.1333130.055205370.0084917

0.0084917P(M)

B)P(M,M)|P(B

B M P(B,E,A,J,M)1 1 0,00849171 0 0,00150830 1 0,055205370 0 0,93479463

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/37

Advantages of probabilistic reasoning

• Sound mathematical theory • On the basis of the joint probability distribution one can

reason about:– the reasons on the basis of the observed

consequences,– consequences on the basis of given evidence,– Any combination of the above ones.

• Clear semantics based on the interpretation of probability.

• Model can be taught with statistical data.

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/38

Complexity of probabilistic reasoning

• in the „alarm” example– (25 – 1) = 31 values,– direct acces to unimportant information, e.g.

P(B=1,E=1,A=1,J=1,M=1) – calculating any practical value, e.g. P(B=1|M=1)

requires 29 elementary operations.

• in general– P(X1, ..., Xn) requires storing 2n-1 values

– difficult knowledge acquisition (not natural)– exponential complexity

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/39

Bayes’ theorem

P(E)H)P(H)|P(E

E)|P(H

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/40

Bayes’ theorem

BA

B depends on A

P(B)A)P(A)|P(B

B)|P(A

P(B|A)

A

A)P(A)|P(BP(B)

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/41

The chain rule

P(X1,X2) = P(X1)P(X2|X1)

P(X1,X2,X3) = P(X1)P(X2|X1)P(X3|X1,X2)

................................................................

P(X1,X2,...,Xn) = P(X1)P(X2|X1)...P(Xn|X1,...,Xn-1)

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/42

Conditional independence of variables in a domain

In any domain one can define a set of variables pa(Xi){X1, ..., Xi–1} such that Xi is independent of variables from the set {X1, ..., Xi–1} \ pa(Xi).

Thus

P(Xi|X1, ..., Xi – 1) = P(Xi|pa(Xi))

and

P(X1, ..., Xn) = P(Xi|pa(Xi))i=1

n

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/43

Bayesian network

B1

A

B2 Bn

C1

.....

Bi directly influences A

Cm.....

P(A|B1, ..., Bn)

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/44

Example

alarm

Mary callsJohn calls

earthquakeburglary

burglary earthquake P(alarm|burglary, earthquake)

true falsetrue true 0.950 0.050true false 0.940 0.060 false true 0.290 0.710false false 0.001 0.999

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/45

Example

A

MJ

EB

P(B)

0.001P(E)

0.002

B E P(A)

T T 0.950T F 0.940F T 0.290F F 0.001

A P(M)

T 0.70F 0.01

A P(J)

T 0.90F 0.05

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/46

Complexity of the representation

• Instead of 31 values it is enough to store 10.

• Easy construction of the model– Less parameters.– More intuitive parameters.

• Easy reasoning.

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/47

Bayesian networks

Bayesian network is an acyclic directed graph which

• nodes represent formulas or variables in the considered domain,

• arcs represent dependence relation of variables, with related probability distributions.

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/48

Bayesian networks

variable A with parent nodes pa(A) = {B1,...,Bn}

conditional probablity table P(A|B1,...,Bn) or P(A|pa(A))

if pa(A) = a priori probability equals P(A)

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/49

Bayesian networks

B1

A

B2 BnB3 .....

pa(A)

P(A|B1, B2, ..., Bn)

Event Bi has no

predecesors (pa(Bi) = ) a priori probability P(Bi)

B1 ... Bn P(A|B1, Bn)

T T 0.18 T F 0.12 ................................. F F 0.28

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/50

Local semantics of Bayesian network

• Only direct dependence relations between variables.

• Local conditional probability distribution.

• Assumption about conditional independence of variables not bounded in the graph.

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/51

Global semantics of bayesian network

Joint probability distribution given implicite.

It can be calculated using the following rule:

i

n1iin1 )A,...,A|P(A)A,...,P(A

))P(AA|)...P(AA,...,A,A|P(A nn1n-n321

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/52

Global semantics of bayesian network

Node numbering: node index is smaller than indices of its predecessors.

Finally:

Bayesian network is a complete probabilistic model.

))pa(A|P(A)A,...,A|P(A iin1ii

i

iin1 ))pa(A|P(A)A,...,P(A

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/53

A2

Global probability distribution

B1

A1

B2 BnB3 .....

P(A1|B1, ...Bn) P(A2|B3, ...Bn)

pa(A1)

pa(A2)

B1 ... Bn A1 A2 P(A1,A2,B1, ...Bn)

T ... T T T T ... T T F ...................................................... F ... F F F

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/54

Global probability distribution

A1

B2 BnB3 .....

A2

pa(A1)

pa(A2)

B1

P(A1|B1, ...Bn)

B1 ... Bn P(A1)

T ... T 0.25 T ... F .......................... F ... F

B1

B1 ... Bn A1 A2 P(A1,A2,B1, ...Bn)

T ... T T T 0.075 T ... T T F ...................................................... F ... F F F

B1

P(A2|B3, ...Bn)

B3 ... Bn P(A2)

T ... T 0.30 T ... F .......................... F ... F

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/55

Reasoning in Bayesian networks

Updating evidence that a hipothesis H is true given some ecidence E, i.e. defining conditional probability distribution P(H|E).

Two types of reasoning:

•probability of a single hipothesis

•probability of all hipothesis.

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/56

Example

A

MJ

EB

P(B)

0.001P(E)

0.002

B E P(A)

T T 0.950T F 0.940F T 0.290F F 0.001

A P(M)

T 0.70F 0.01

A P(J)

T 0.90F 0.05

John calls (J) and Mary calls (M). What is the probability that neither

burglary nor earthquake occurred if the alarm

rang?

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/57

Example

A

MJ

EB

P(B)

0.001

P(E)

0.002

B E P(A)

T T 0.950T F 0.940F T 0.290F F 0.001

A P(M)

T 0.70F 0.01

A P(J)

T 0.90F 0.05

E)BAMP(J

E)B)P(E)P(B|A)P(A|A)P(M|P(J

i

iin1 ))pa(A|P(A)A,...,P(A

?E)BAMP(J

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/58

Example

A

MJ

EB

P(B)

0.001

P(E)

0.002

B E P(A)

T T 0.950T F 0.940F T 0.290F F 0.001

A P(M)

T 0.70F 0.01

A P(J)

T 0.90F 0.05

?E)BAMP(J

E)BAMP(J E)B)P(E)P(B|A)P(A|A)P(M|P(J

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/59

Example

A

MJ

EB

P(B)

0.001

P(E)

0.002

B E P(A)

T T 0.950T F 0.940F T 0.290F F 0.001

A P(M)

T 0.70F 0.01

A P(J)

T 0.90F 0.05

?E)BAMP(J

E)BAMP(J E)B)P(E)P(B|A)P(A|A)P(M|P(J

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/60

Example

A

MJ

EB

P(B)

0.001

P(E)

0.002

B E P(A)

T T 0.950T F 0.940F T 0.290F F 0.001

A P(M)

T 0.70F 0.01

A P(J)

T 0.90F 0.05

?E)BAMP(J

E)BAMP(J E)B)P(E)P(B|A)P(A|A)P(M|P(J

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/61

Example

A

MJ

EB

P(B)

0.001

P(E)

0.002

B E P(A)

T T 0.950T F 0.940F T 0.290F F 0.001

A P(M)

T 0.70F 0.01

A P(J)

T 0.90F 0.05

?E)BAMP(J

E)BAMP(J E)B)P(E)P(B|A)P(A|A)P(M|P(J

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/62

Example

A

MJ

EB

P(B)

0.001

P(E)

0.002

B E P(A)

T T 0.950T F 0.940F T 0.290F F 0.001

A P(M)

T 0.70F 0.01

A P(J)

T 0.90F 0.05

?E)BAMP(J

E)BAMP(J E)B)P(E)P(B|A)P(A|A)P(M|P(J

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/63

Example

A

MJ

EB

P(B)

0.001

P(E)

0.002

B E P(A)

T T 0.950T F 0.940F T 0.290F F 0.001

A P(M)

T 0.70F 0.01

A P(J)

T 0.90F 0.05

?E)BAMP(J

E)BAMP(J

0.00062 0.998*0.999*0.001*0.7*0.9 E)B)P(E)P(B|A)P(A|A)P(M|P(J

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/64

Types of reasoning in Bayesian networks

B

J

Evidence B occurs and we qould like to update probability of hipothesis J.

Interpretation.

There was a burglary, what is the probability that John will call?

A

P(J|B) = P(J|A)P(A|B) = 0.9 * 0.95 = 0.86

P(B) = 0.001

A P(J)

T 0.90F 0.05

B P(A)

T 0.95F 0.01

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/65

Types of reasoning in Bayesian networks

Wnioskowanie diagnostyczne

We observe J – what is the probability that B is true?

Diagnosis.

John calls. What is the probability of a burglary?

B

J

A

P(B|J) = P(J|B)*P(B)/P(J) =

(0,95*0,9*0,001)/(0,9+0,05) = 0,0009

P(B) = 0.001

A P(J)

T 0.90F 0.05

B P(A)

T 0.95F 0.01

diagnostic

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/66

Types of reasoning in Bayesian networks

B E

We observe E. What is the probability that B is true?

Alarm rang, so P(B|A) = 0.376, but if earthuake is observed as well then P(B|A,E) = 0.03

A

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/67

Types of reasoning in Bayesian networks

E

A

J

mixed

We observe E and J What is the probability of A.

John calls and we know that there was an earthquake. What is the probability that alarm rang?

P(A|J,E) = 0.03

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/69

Multiply connected Bayesian network

B1

A2

B2 Bn

C1

.....

Cm.....

...A1 Ak

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/70

Summary

• Models of uncertainty:

• Certainty factor, certainty measure

• Dempster-Shafer theory

• Bayesian networks

• Fuzzy sets

• Raough sets

Dr hab. inż. Joanna Józefowska, prof. PP

To

pic

s in

Art

ific

ial I

nte

llig

en

ce

1/71

Summary

• Bayesian networks represent joint probability distribution.

• Reasoning in multiply connected BN is NP-hard.

• Exponential complexity may be avoided by:

• Constructing the net as a polytree

• Transforming a network to a polytree

• Approximate reasoning

top related