UNCERTAINTY IN KNOWLEDGE Ch. 9 Uncertainty in Knowledge 1 - - PowerPoint PPT Presentation

uncertainty in knowledge
SMART_READER_LITE
LIVE PREVIEW

UNCERTAINTY IN KNOWLEDGE Ch. 9 Uncertainty in Knowledge 1 - - PowerPoint PPT Presentation

UNCERTAINTY IN KNOWLEDGE Ch. 9 Uncertainty in Knowledge 1 Sources of Uncertainty Uncertainty in problem solving can be attributed to Imperfect domain knowledge Imperfect case data Experts employ inexact methods for two


slide-1
SLIDE 1
  • Ch. 9

Uncertainty in Knowledge 1

UNCERTAINTY IN KNOWLEDGE

slide-2
SLIDE 2
  • Ch. 9

Uncertainty in Knowledge 2

Sources of Uncertainty

  • Uncertainty in problem solving can be attributed to

– Imperfect domain knowledge – Imperfect case data

  • Experts employ inexact methods for two reasons

– Exact methods are not known; and – Exact methods are known but are impractical, owing to lack of data, or problem with data collection, or difficulties with data processing.

slide-3
SLIDE 3
  • Ch. 9

Uncertainty in Knowledge 3

Conditional Probability for Expert System Rule

If: the patient has symptom of chest pain Then: conclude myocardial infarction with probability P where P is the following conditional probability:

pain) chest infarction myocardial P(

slide-4
SLIDE 4
  • Ch. 9

Uncertainty in Knowledge 4

Definition of Conditional Probability

Thus, to compute P(myocardinal infarction | chest pain), one needs the following information which is usually unavailable. P(myocardinal infarction ∧ chest pain )

) ( ) ( ) | ( s P s d P s d P ∧ =

slide-5
SLIDE 5
  • Ch. 9

Uncertainty in Knowledge 5

Bayes’ Rule

) ( ) ( ) | ( ) ( ) ( ) | ( d P s d P d s P s P s d P s d P ∧ = ∧ =

By definition of conditional probability: Thus we have Bayes’ rule as follows:

) ( ) ( ) | ( ) | ( s P d P d s P s d P =

slide-6
SLIDE 6
  • Ch. 9

Uncertainty in Knowledge 6

The Use of Bayes’ Rule

  • The doctors have some consistent notion of how many

heart attach patients have chest pain, and will be able to give an estimate of P(chest pain | myocardial infarction)

  • Medical statistics should enable an estimate of

P(myocardial infarction) while a doctor’s own records could provide an estimate of P(chest pain).

  • Thus Bayes’ Rule allows the writing of the expert system

rule to infer myocardial infarction based on observation of chest pain.

slide-7
SLIDE 7
  • Ch. 9

Uncertainty in Knowledge 7

General Form of Bayes’ Rule

In order to compute P ( s1∧…∧sk), we must compute However, we can assume conditional independence, such that

) ... ( ) ( ) | ... ( ) ... | (

1 1 1 k k k

s s P d P d s s P s s d P ∧ ∧ ∧ ∧ = ∧ ∧

) ( )... ... | ( ) ... | (

3 2 2 1 k k k

s P s s s P s s s P ∧ ∧ ∧ ∧ ) ( )... ( ) ( ) ... (

2 1 2 1 k k

s P s P s P s s s P = ∧ ∧ ∧

slide-8
SLIDE 8
  • Ch. 9

Uncertainty in Knowledge 8

Certainty Factors in MYCIN

If: the patient has signs and symptoms s1∧…∧ sk, and certain background conditions t1∧…∧ tm hold Then: conclude that the patient has disease di, with certainty τ Thus the degree of certainty associated with the conclusion is: CF(di, s1∧…∧ sk∧ t1∧…∧ tm ) = τ × min (CF(s1),…,CF(Sk),CF(t1),…,CF(tm) )

slide-9
SLIDE 9
  • Ch. 9

Uncertainty in Knowledge 9

Measures of Belief and Disbelief

  • If, by adding supporting evidence e, P(h | e) > P(h), then

the measure of belief MB is:

  • If, on the other hand, e constitutes evidence against h, such

that P(h | e) < P(h), then the measure of disbelief: ) ( 1 ) ( ) | ( ) , ( h P h P e h P e h MB − − = ) ( ) | ( ) ( ) , ( h P e h P h P e h MD − =

slide-10
SLIDE 10
  • Ch. 9

Uncertainty in Knowledge 10

Certainty Factor Algebra

  • Either:

1 > MB(h , e) > 0 while MD(h , e) = 0 or 1 > MD(h , e) > 0 while MB(h , e) = 0

  • MB and MD constrain each other in that e is either for or

against h. Once the line between the two is established, they can be tied together by: CF(h , e) = MB(h , e) – MD(h , e)

  • As CF approaches 1, the evidence e is stronger for

hypothesis h; as CF approaches –1, then confidence against the hypothesis gets stronger.

slide-11
SLIDE 11
  • Ch. 9

Uncertainty in Knowledge 11

Combining CFs within a Rule

  • For conjunctive premises:

CF(P1 and P2) = MIN(CF(P1), CF(P2))

  • For disjunctive premises:

CF(P1 or P2) = MAX(CF(P1), CF(P2))

  • Example:

(P1 and P2) or P3 ⇒ R1(0.7) and R2(0.3) CF(P1(0.6) and P2(0.4)) = MIN(0.6, 0.4) = 0.4 CF((0.4) or P3(0.2)) = MAX(0.4,0.2) = 0.4 CF for R1 = 0.7 × 0.4 = 0.28 CF for R2 = 0.3 × 0.4 = 0.12

slide-12
SLIDE 12
  • Ch. 9

Uncertainty in Knowledge 12

Combining CFs from Different Rules

  • Assume that two rules support the same result R. Let R1

represent the result R from one rule and R2 the result R from another rule. One of the following situations applies: – CF(R1) and CF(R2) are both positive, then – CF(R1) and CF(R2) are both negative, then – Otherwise:

)) ( ) ( ( ) ( ) ( ) (

2 1 2 1

R CF R CF R CF R CF R CF × − + = )) ( ) ( ( ) ( ) ( ) (

2 1 2 1

R CF R CF R CF R CF R CF × + + = |) ) ( | ), ( (| 1 ) ( ) ( ) (

2 1 2 1

R CF R CF MIN R CF R CF R CF − + =

slide-13
SLIDE 13
  • Ch. 9

Uncertainty in Knowledge 13

The use of CFs in MYCIN

  • To guide the program in its reasoning
  • To cause the current goal to be deemed unpromising

and pruned from the search space if its CF falls in the range of [+0.2, −0.2]

  • To rank hypotheses after all the evidence has been

considered.

slide-14
SLIDE 14
  • Ch. 9

Uncertainty in Knowledge 14

CFs and Probabilities

  • Suppose that

P(d1) = 0.8; P(d1 | e) = 0.9 P(d2) = 0.2; P(d2 | e) = 0.8

  • The increase in belief in d1 is:
  • The increase in belief in d2 is:
  • Thus CF(d1,e) < CF(d2,e) even though P(d1 | e) > P(d2 | e)

5 . 8 . 1 8 . 9 . ) ( 1 ) ( ) | ( ) , ( ) , (

1 1 1 1 1

= − − = − − = − = d P d P e d P e d MB e d CF 75 . 2 . 1 2 . 8 . ) ( 1 ) ( ) | ( ) , ( ) , (

2 2 2 2 2

= − − = − − = − = d P d P e d P e d MB e d CF

slide-15
SLIDE 15
  • Ch. 9

Uncertainty in Knowledge 15

Implementing CFs in CLIPS

  • Consider the following MYCIN rule:

IF The stain of the organism is gramneg and The morphology of the organism is rod and The patient is a compromised host Then There is suggestive evidence (0.6) that the identity of the organism is pseudomonas

  • Represent facts as object-attribute-value (OAV) triples.
  • The OAV template allows two identical OAV triples to be

asserted only if they have different CFs. To allow identical OAV triples with the same CFs, set the following (set-fact-duplication TRUE)

slide-16
SLIDE 16
  • Ch. 9

Uncertainty in Knowledge 16

Implementing CFs in CLIPS (contd.)

CLIPS> (defmodule OAV (export deftemplate oav) (deftemplate OAV::oav (multislot object (type SYMBOL) (multislot attribute (type SYMBOL) (multislot value) (slot CF (type FLOAT) (range –1.0 +1.0) ) ) CLIPS> (deffacts data (oav (object organism) (attribute stain) (value gramneg) (CF 0.3)) (oav (object organism) (attribute morphology) (value rod) (CF 0.7)) (oav (object patient) (attribute is a) (value compromised host) (CF 0.8) ) )

slide-17
SLIDE 17
  • Ch. 9

Uncertainty in Knowledge 17

Combining CFs of Different Facts

CLIPS> (defrule OAV:: combine-CFs-both-positive (declare (auto-focus TRUE)) ?fact1 <− (oav (object $?o) (attribute $?a) (value $?v) (CF ?C1&: (>= ?C1 0 ) ) ) ?fact2 <− (oav (object $?o) (attribute $?a) (value $?v) (CF ?C2&: (>= ?C2 0 ) ) ) (test (neq ?fact1 ?fact2) ) => (retract ?fact1) (bind ?C3 (− (+ ?C1 ?C2) (* ?C1 ?C2) ) ) (modify ?fact2 (CF ?C3) ) )

slide-18
SLIDE 18
  • Ch. 9

Uncertainty in Knowledge 18

Combining CFs within a Rule

CLIPS> (defmodule IDENTIFY (import OAV deftemplate oav)) (defrule IDENTIFY::MYCIN-to-CLIPS-translation (oav (object organism) (attribute stain) (value gramneg) (CF ?C1) ) (oav (object organism) (attribute morphology) (value rod) (CF ?C2) ) (oav (object patient) (attribute is a) (value compromised host) (CF ?C3) ) (test (> (min ?C1 ?C2 ?C3) 0.2) ) => (bind ?C4 (* (min ?C1 ?C2 ?C3) 0.6) ) (assert (oav (object organism) (attribute identity) (value pseudomonas) (CF ?C4) ) ) )

slide-19
SLIDE 19
  • Ch. 9

Uncertainty in Knowledge 19

Classic Sets (Crisp Sets)

  • f(X) = true if and only if X ∈ A
  • Characterizing a set of cars capable of more than 150 mph:
  • The set may also be written as:

{X ∈ CAR | TOP-SPEED(X) > 150 }    > =

  • therwise

false X SPEED

  • TOP

and X CAR if true X GT 150 ) ( ) ( ) ( 150

slide-20
SLIDE 20
  • Ch. 9

Uncertainty in Knowledge 20

Fuzzy Sets

  • A fuzzy set is a function f with domain [0,1], whose value

denotes degree of membership, with 0 denoting that X is not a member and 1 denoting that X is definitely a member.

  • Car Example: fFAST(80) = 0 and fFAST(180) = 1
  • fFAST-CAR(X) = fFAST(TOP-SPEED(X))
  • FAST-CAR= {

(Porsche-944, 0.9), (BMW-316, 0.5), (Chevy-Nova, 0.1) }

Fast cars Porsche 944 BMW316 Chevy Nova

slide-21
SLIDE 21
  • Ch. 9

Uncertainty in Knowledge 21

Fuzzy Logic

  • ¬F(X) = 1 − F(X)
  • f(F∧G)(X) = MIN (fF(X), fG(X) )
  • f(F/G)(X) = MAX (fF(X), fG(X) )
  • Examples:

FAST-CAR(Porsche-944) = 0.9 ¬FAST-CAR(Porsche-944) = 0.1 PRETENTIOUS-CAR(Porsche-944) = 0.7 FAST-CAR(Porsche-944) ∧ PRETENTIOUS-CAR(Porsche-944) = 0.7 FAST-CAR(Porsche-944) ∧ ¬FAST-CAR(Porsche-944) = 0.1 FAST-CAR(Porsche-944) ∨ ¬FAST-CAR(Porsche-944) = 0.9

slide-22
SLIDE 22
  • Ch. 9

Uncertainty in Knowledge 22

Possibility Theory

  • Possibility theory is a species of fuzzy logic for dealing with

precise questions on the basis of imprecise knowledge.

  • Suppose an urn contains 10 balls and it is known that several
  • f them are red. Define “several” as a fuzzy set:

fSEVERAL = {(3,0.2), (4,0.6), (5,1.0), (6,1.0), (7,0.6), (8,0.3))

  • Define possibility distribution as

fP(RED) = SEVERAL/10 = {(0.3,0.2), (0.4,0.6), (0.5,1.0), (0.6,1.0), (0.7,0.6), (0.8,0.3)) where (0.3,0.2) ∈ fP(RED) denotes that there is 20% chance that P(RED)=0.3. We can regard fP(RED) as a fuzzy probability.

slide-23
SLIDE 23
  • Ch. 9

Uncertainty in Knowledge 23

Dempster-Shafer Theory

  • Hypothesis Space: Frame of discernment : Θ
  • Hypotheses in Θ are both exhaustive and mutually

exclusive

  • Obtaining evidence not merely for single hypotheses

h1, …, hn but also subsets of hypotheses A1,…,Ak which may overlap.

  • Mapping evidence as member of Ψ to a subset of Θ

known as a focal element: Γ : Ψ → 2Θ

slide-24
SLIDE 24
  • Ch. 9

Uncertainty in Knowledge 24

Belief Functions

  • The basic probability assignment (bpa) of D-S theory, m, is

a function from 2Θ to [0,1] such that m(∅) = 0; and

  • The total belief, Bel, in any focal element A is a function

from 2Θ to [0,1] such that

  • Bel(Θ ) is always 1, regardless of the value of m(Θ ). Bel

and m will be equal for singleton sets.

Θ

=

2

1 )) ( (

i

A i

A m

∑ ⊂

=

A B

B m A Bel ) ( ) (

slide-25
SLIDE 25
  • Ch. 9

Uncertainty in Knowledge 25

Plausibility Functions

  • The plausibility of A, Pls(A), represents the degree to which

the evidence is consistent with A:

  • The plausibility of A is simply the degree to which we do not

believe in ¬A. Thus

  • The probability of A is bounded below by Bel(A) and above

by Pls(A). Thus we have a belief interval : [Bel(A), Pls(A)] whose width can be regarded as the amount of uncertainty with respect to a hypothesis given the available evidence.

≠ ∩

=

φ B A

B m A Pls ) ( ) (

) ( 1 ) ( A Bel A Pls ¬ − =

slide-26
SLIDE 26
  • Ch. 9

Uncertainty in Knowledge 26

Dempster’s Rule

  • Given two belief functions Bel1 and Bel2 with their

respective bpas, m1 and m2, the rule computes a new bpa m1⊕m2 as follows:

  • m1⊕m2 is defined as the sum of all products of m1(X) m2(Y),

where X and Y range over all subsets of Θ whose intersection is A. When there are empty entries in the intersection table, a normalization is applied, by dividing Σ m1⊕m2 by 1−κ where κ is the sum of all non-zero values assigned to ∅.

∑ ∑

= ∩ = ∩

− = ⊕

φ Y X A Y X

Y m X m Y m X m A m m ) ( ) ( 1 ) ( ) ( ) (

2 1 2 1 2 1

slide-27
SLIDE 27
  • Ch. 9

Uncertainty in Knowledge 27

A Example of Belief Functions

  • Assume a simplified diagnosis problem, where Θ consists
  • f the set of four hypotheses {Allegy, Flu, Cold, Pneunonia}
  • r {A, F, C, P}.
  • There are 24 subsets of hypothesis in Θ including ∅.
  • Suppose m1 corresponds to the belief after observing fever:

m1({F, C, P}) (0.6) m1(Θ ) (0.4)

  • Suppose m2 corresponds to the belief after observing runny

nose: m2({A, F, C}) (0.8) m2(Θ ) (0.2)

slide-28
SLIDE 28
  • Ch. 9

Uncertainty in Knowledge 28

Computing New Belief Functions

All values of m1 and m2 sum to 1 and there is no empty

  • subset. No normalization is needed. Let m3 = m1⊕m2

m3({F,C}) (0.48) m3({A,F,C}) (0.32) m3({F,C,P}) (0.12) m3(Θ )(0.08) (0.08) Θ (0.32) {A,F,C} (0.4) Θ (0.12) {F,C,P} (0.48) {F,C} (0.6) {F,C,P} (0.2) Θ (0.8) {A,F,C}

slide-29
SLIDE 29
  • Ch. 9

Uncertainty in Knowledge 29

Adding new evidence

Assume a new piece evidence is added to support the following singleton hypothesis set: m4({A}) (0.9) m4(Θ ) (0.1) (0.008) Θ (0.072) {A} (0.08) Θ (0.012) {F,C,P} (0.108) ∅ (0.12) {F,C,P} (0.032) {A,F,C} (0.288) {A} (0.32) {A,F,C} (0.048) {F,C} (0.432) ∅ (0.48) {F,C} (0.1) Θ (0.9) {A}

slide-30
SLIDE 30
  • Ch. 9

Uncertainty in Knowledge 30

Normalization

  • There is a total belief of 0.54 (κ) associated with ∅; only

0.46 is associated with outcomes that are in fact possible. So there is a need to scale the remaining values by the factor 1− κ = 1− 0.54 = 0.46.

  • Thus the final belief m5= m3⊕m4/1− κ :

m5({F,C}) (0.104) m5({A,F,C}) (0.070) m5({F,C,P}) (0.026) m5({A}) (0.783) m5(Θ ) (0.017)

slide-31
SLIDE 31
  • Ch. 9

Uncertainty in Knowledge 31

Applying D-S theory to MYCIN

Three ways of combining evidence in MYCIN

  • Two rules either both confirm or disconfirm the same

conclusion {H} with bpas m1 and m2. No normalization. Updated belief: m1⊕m2({H}) and m1⊕m2(Θ )

  • One rule confirms {H} with m1and another one rule

disconfirms {H} with m2 (i.e. confirms {H}c with m2). Normalization is needed as {H}∩{H}c = ∅. Updated belief: m1⊕m2({H}) m1⊕m2({H}c) and m1⊕m2(Θ )

  • Rules conclude competing {H1} and {H2}. Normalization is

needed as {H1}∩{H2} = ∅. Updated belief: m1⊕m2({H1}) m1⊕m2({H2}) and m1⊕m2(Θ )