chaining & uncertainty

88
A quick look A quick look Inference Chaining Inference Chaining Forward Chaining Forward Chaining Backward Chaining Backward Chaining Conflict and it’s resolution Conflict and it’s resolution Meta knowledge Meta knowledge Uncertainty in Rule-Based Expert System Uncertainty in Rule-Based Expert System

Upload: arch-sidz

Post on 08-Aug-2015

65 views

Category:

Engineering


0 download

TRANSCRIPT

Page 1: Chaining & uncertainty

A quick lookA quick look

Inference ChainingInference Chaining

Forward ChainingForward Chaining

Backward ChainingBackward Chaining

Conflict and it’s resolutionConflict and it’s resolution

Meta knowledgeMeta knowledge

Uncertainty in Rule-Based Expert SystemUncertainty in Rule-Based Expert System

Page 2: Chaining & uncertainty

Inference ChainingInference Chaining

Page 3: Chaining & uncertainty

Inference Chaining

•In rule-based expert system, the domain knowledge is represented by a set of IF-THEN production rules and data is represented by a set of facts about the current situation.

•The inference engine compares each rule stored in the knowledge base with facts contained in the database.

Page 4: Chaining & uncertainty

Inference Chaining

Fact: A is XFact: A is X Fact: B is yFact: B is y

Rule: IF A is x THEN B is yRule: IF A is x THEN B is y

Knowledge baseKnowledge base

DatabaseDatabase

MatchMatch FireFire

Figure : The inference engine cycles via a match-fire procedure Figure : The inference engine cycles via a match-fire procedure

Page 5: Chaining & uncertainty

Inference Chaining

The matching of the IF parts to the facts produces inference chains.

The inference engine must decide when the rules have to be fired. There are two principal ways in which rules are executed –

• Forward Chaining• Backward Chaining

Page 6: Chaining & uncertainty

Forward ChainingForward Chaining

Page 7: Chaining & uncertainty

Inference Chaining

Forward chaining

•It’s the data-driven reasoning.

•The reasoning starts from the known data and proceeds forward with that data.

•Each time only the topmost rule is executed.

•When fired, the rule adds a new fact in the database.

•Any rule can be executed only once.

•The match-fire cycle stops when no further rules can be fired.

Page 8: Chaining & uncertainty

Let’s see an exampleLet’s see an example

Page 9: Chaining & uncertainty

Knowledge-Base

Database

Rule-based Knowledge representation

Y & D Z

X & B & E Y

A X

C L

L & M N

Match Fire

A B C D E

X

Knowledge-Base

Database

Y & D Z

X & B & E Y

A X

C L

L & M N

Match Fire

A B C D E

LX

Cycle #1

Forward chaining

Page 10: Chaining & uncertainty

Rule-based Knowledge representation

Knowledge-Base

Database

Y & D Z

X & B & E Y

A X

C L

L & M N

Match Fire

A B C D E

YL

Cycle #2

Forward chaining

X

Knowledge-Base

Database

Y & D Z

X & B & E Y

A X

C L

L & M N

Match Fire

A B C D E

ZYLX

Cycle #3

Page 11: Chaining & uncertainty

Backward ChainingBackward Chaining

Page 12: Chaining & uncertainty

Rule-based Knowledge representation

•Backward chaining

•It’s the goal-driven reasoning.

•Here an expert system has the goal and the inference engine attempts to find the evidence to prove it.

•First the knowledge base is searched to find rules that might have the desired solution.

•Such rules must have the goal in their THEN parts. If such rule is found and its IF part matches data in the database, then the rule is fired and the goal is proved.

Page 13: Chaining & uncertainty
Page 14: Chaining & uncertainty
Page 15: Chaining & uncertainty
Page 16: Chaining & uncertainty
Page 17: Chaining & uncertainty
Page 18: Chaining & uncertainty

Rule-based Knowledge representation

Knowledge-Base

Database

Y & D Z

X & B & E Y

A X

C L

L & M N

A B C D E

Pass 1: Goal: Z

Backward chaining

Pass 2: Sub-goal: y

Z

Knowledge-Base

Database

Y & D Z

X & B & E Y

A X

C L

L & M N

A B C D E

Y

?

Page 19: Chaining & uncertainty

Rule-based Knowledge representation

Pass 3: Sub goal:X

Backward chaining

Knowledge-Base

Database

Y & D Z

X & B & E Y

A X

C L

L & M N

A B C D E

X

?

Knowledge-Base

Database

Y & D Z

X & B & E Y

A X

C L

L & M N

A B C D E

Pass 4: Sub goal:X

Match Fire

X

Page 20: Chaining & uncertainty

Rule-based Knowledge representation

Pass 5: Sub-goal: Y

Backward chaining

Knowledge-Base

Database

Y & D Z

X & B & E Y

A X

C L

L & M N

A B C D E

Pass 6:Goal: Z

Match Fire

YX

Knowledge-Base

Database

Y & D Z

X & B & E Y

A X

C L

L & M N

A B C D E

Match Fire

ZYX

Page 21: Chaining & uncertainty

Forward VS Backward ChainingForward VS Backward Chaining

Page 22: Chaining & uncertainty

Forward vs. Backward ChainingForward vs. Backward Chaining

consequents (RHS) control evaluation

antecedents (LHS) control evaluation

similar to depth-first searchsimilar to breadth-first search

find facts that support a given hypothesis

find possible conclusions supported by given facts

top-down reasoningbottom-up reasoning

goal-driven (hypothesis)data-driven

diagnosisplanning, control

Backward ChainingForward Chaining

Page 23: Chaining & uncertainty

How do we choose between forward How do we choose between forward and backward chaining?and backward chaining?

Page 24: Chaining & uncertainty

Can we combine forward and Can we combine forward and backward chaining?backward chaining?

Page 25: Chaining & uncertainty

ConflictConflict

Page 26: Chaining & uncertainty

ConflictConflict

Let’s see an example….Let’s see an example….

Page 27: Chaining & uncertainty

ConflictConflict

Rule 1 Rule 2

IF IF

THEN THEN

The Agent has two legs

AND The Agent has two hands

AND The Agent can sleep

The Agent has two legs

AND The Agent has two hands

AND The Agent can sleep

The Agent is a Man The Agent is not a Man

Page 28: Chaining & uncertainty

So Conflict means …So Conflict means …

A situationA situation WhenWhen Two or more actions are foundTwo or more actions are found For only one conditionFor only one condition

Page 29: Chaining & uncertainty

HOW TO RESOLVE A CONFLICT?HOW TO RESOLVE A CONFLICT?

Page 30: Chaining & uncertainty

They have given They have given 33 methods to methods to

resolve conflictresolve conflict

Page 31: Chaining & uncertainty

Method 1Method 1

Fire the rule with theFire the rule with the

• Highest priorityHighest priority

Page 32: Chaining & uncertainty

Method 2Method 2

Fire the rule with theFire the rule with the

• LONGEST MATCHLONGEST MATCH

Page 33: Chaining & uncertainty

Method 3Method 3

Fire the rule with theFire the rule with the

• Data most recently enteredData most recently entered

Page 34: Chaining & uncertainty

So keep it in mindSo keep it in mind

Highest priorityHighest priority

Longest matchLongest match

Recent timestampRecent timestamp

Page 35: Chaining & uncertainty

METAKNOWLEDGEMETAKNOWLEDGE

Page 36: Chaining & uncertainty

METADATA = Data about data.METADATA = Data about data.

METAKNOWLEDGE = knowledge about METAKNOWLEDGE = knowledge about knowledge.knowledge.

Knowledge about the Knowledge about the propertiesproperties and and usesuses of knowledge.of knowledge.

Page 37: Chaining & uncertainty

METAKNOWLEDGEMETAKNOWLEDGE

Metaknowledge is knowledge about Metaknowledge is knowledge about the the use use andand control control of domain of domain knowledge in an expert system.knowledge in an expert system.

-----------Waterman, 1986-----------Waterman, 1986

Page 38: Chaining & uncertainty

Why Metaknowledge?Why Metaknowledge?

To improve the To improve the performance performance of an of an expert system, we should supply the expert system, we should supply the system with some knowledge about system with some knowledge about the knowledge it possesses.the knowledge it possesses.

Page 39: Chaining & uncertainty

RepresentationRepresentation

In rule-based expert systems, In rule-based expert systems, metaknowledge is represented by metaknowledge is represented by metarules.metarules.

Page 40: Chaining & uncertainty

What is metarule?What is metarule?

Page 41: Chaining & uncertainty

MetaruleMetarule

Rule about ruleRule about rule

A metarule determines a strategy for A metarule determines a strategy for use of task-specific rules in expert use of task-specific rules in expert system.system.

Page 42: Chaining & uncertainty

Example of MetaruleExample of Metarule

Metarule 1:Metarule 1:

Rules supplied by experts have Rules supplied by experts have higher priorities than rules supplied higher priorities than rules supplied by novices.by novices.

Page 43: Chaining & uncertainty

Example of MetaruleExample of Metarule

Metarule 2:Metarule 2:

Rules governing the rescue of Rules governing the rescue of human lives have higher priorities human lives have higher priorities than rules concerned with clearing than rules concerned with clearing overloads on power system overloads on power system equipment.equipment.

Page 44: Chaining & uncertainty

What is the origin of What is the origin of Metaknowledge?Metaknowledge?

The knowledge engineer transfers The knowledge engineer transfers the knowledge domain expert to the the knowledge domain expert to the expert system, learns how problem-expert system, learns how problem-specific rules are used, and gradually specific rules are used, and gradually creates in his or her own mind a new creates in his or her own mind a new body of knowledge, knowledge about body of knowledge, knowledge about overall behaviour of the expert overall behaviour of the expert system.system.

Page 45: Chaining & uncertainty

CAN AN EXPERT SYSTEM CAN AN EXPERT SYSTEM UNDERSTAND AND USE METARUES?UNDERSTAND AND USE METARUES?

Page 46: Chaining & uncertainty

Most expert systems cannot distinguish Most expert systems cannot distinguish between rules and metarules.between rules and metarules.

Some expert systems provide a separate Some expert systems provide a separate inference engine for metarules.inference engine for metarules.

Metarules should be given highest priority Metarules should be given highest priority in the existing knowledge base.in the existing knowledge base.

Page 47: Chaining & uncertainty

When fired, a metarule When fired, a metarule injects injects some some important information into the important information into the database than can change the database than can change the priorities of some other rules.priorities of some other rules.

Page 48: Chaining & uncertainty

U N C E R T A I N T YU N C E R T A I N T Y

Common characteristics of Common characteristics of InformationInformation

I M P E R F E C T I O NI M P E R F E C T I O N

Page 49: Chaining & uncertainty

UNCERTAINTYUNCERTAINTY

in expert systemin expert system

Lack of the exact knowledge that Lack of the exact knowledge that would enable us to reach a would enable us to reach a

perfectly reliable conclusion.perfectly reliable conclusion.

Page 50: Chaining & uncertainty

Uncertain knowledge in expert Uncertain knowledge in expert systemsystem

Four main sources:Four main sources: Weak implicationsWeak implications Imprecise languageImprecise language Unknown dataUnknown data Combining the views of different Combining the views of different

experts.experts.

Page 51: Chaining & uncertainty

Dealing Uncertainty Dealing Uncertainty in rule-based expert systemin rule-based expert system

Numeric methodsNumeric methods Non-numeric methodsNon-numeric methods

We will focus on We will focus on

Bayesian reasoningBayesian reasoning Certainty factorCertainty factor

Page 52: Chaining & uncertainty

Basic Probability TheoryBasic Probability Theory

‘‘probably’ , ‘likely’, ‘maybe’, probably’ , ‘likely’, ‘maybe’, ’perhaps’,’perhaps’,

‘ ‘possibly’ – common terms in possibly’ – common terms in spoken language.spoken language.

The mathematical theory wasThe mathematical theory was

formulated in the 17formulated in the 17thth century century

Page 53: Chaining & uncertainty

ProbabilityProbability

The probability of an event is the The probability of an event is the proportion of cases in which the event proportion of cases in which the event occurs.occurs.

Scientific measure of chances.Scientific measure of chances.

Probability index – Between 0 and 1.Probability index – Between 0 and 1. Favourable outcome or successFavourable outcome or success Unfavourable outcome of failureUnfavourable outcome of failure

Page 54: Chaining & uncertainty

Probability of success & failureProbability of success & failure

fs

sp

success)(P

fs

fq

failure)(P

1 qp

Page 55: Chaining & uncertainty

Coin & Die ExampleCoin & Die Example

Probability of getting a 6 :Probability of getting a 6 :

Probability of not getting a 6:Probability of not getting a 6:

1666.051

1

p

8333.051

5

q

Page 56: Chaining & uncertainty

Conditional ProbabilityConditional Probability

Event A will occur if event B occurs.Event A will occur if event B occurs. Participating events are not mutually Participating events are not mutually

exclusiveexclusive

Mathematical notation: Mathematical notation: p p ((AA||B B )) Interpretation is:Interpretation is: “ “ Conditional probability of event A occurring Conditional probability of event A occurring

given that event B has occurred ”given that event B has occurred ”

Page 57: Chaining & uncertainty

Joint Probability Joint Probability

Probability that both A and B will Probability that both A and B will occur.occur.

Joint Probability is commutativeJoint Probability is commutative

)( BAp

)()( ABpBAp

Page 58: Chaining & uncertainty

Defining Conditional probabilityDefining Conditional probability

Probability of event A occurring given that Probability of event A occurring given that event B has occurredevent B has occurred

Probability of event B occurring given that Probability of event B occurring given that event A has occurredevent A has occurred

)(

)()|(

Bp

BApBAp

)(

)()|(

Ap

ABpABp

Page 59: Chaining & uncertainty

Deriving Bayesian RuleDeriving Bayesian Rule From the previous definition , we From the previous definition , we

getget

As the joint probability is As the joint probability is commutativecommutative

Hence , through substitution, we Hence , through substitution, we get the equation,get the equation,

)()|()(

)(

)()|(

ApABpABp

Ap

ABpABp

)()( ABpBAp

)(

)()|(

)(

)()|(

Bp

ApABp

Bp

BApBAp

Page 60: Chaining & uncertainty

Bayesian RuleBayesian Rule

If event A depends on a If event A depends on a number of mutually number of mutually exclusive events Bexclusive events B11,B,B22,..,B,..,Bn.n.

When combined,When combined,

)(

)()|()|(

Bp

ApABpBAp

)()|()(

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

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

)()|()(

)()|()(

222

111

nnn BPBAPBAp

BPBAPBAp

BPBAPBAp

n

i

n

i

iii BpBApBAp1 1

)()|()(

Page 61: Chaining & uncertainty

Bayesian RuleBayesian Rule

n

i

i ApBAp1

)()(

B4

B1

B3B2

n

i

ii BpBApAp1

)()|()(

Page 62: Chaining & uncertainty

Bayesian RuleBayesian Rule

If the occurrence of event A depends on only two If the occurrence of event A depends on only two mutually exclusive events, B and NOT B,thenmutually exclusive events, B and NOT B,then

Similarly,Similarly,

HenceHence

)()|()()|()( BpBApBpBApAp

)()|()()|()( ApABpApABpBp

)()|()()|(

)()|()|(

)(

)()|()|(

ApABpApABp

ApABpBAp

Bp

ApABpBAp

Page 63: Chaining & uncertainty

Bayesian RuleBayesian Rule

The following equation provides the The following equation provides the background for the application of background for the application of probability theory to manage uncertainity probability theory to manage uncertainity in expert systemin expert system

)()|()()|(

)()|()|(

ApABpApABp

ApABpBAp

Page 64: Chaining & uncertainty

Bayesian reasoningBayesian reasoning

Let, representation of rules in the knowledge base :Let, representation of rules in the knowledge base :

IF IF E E is true is true

THEN THEN HH is true { with probability p} is true { with probability p}

Event E has occurred , but we do not know whether Event E has occurred , but we do not know whether event H has occurred.event H has occurred.

E ------ > Evidence H ------ > HypothesisE ------ > Evidence H ------ > Hypothesis

)()|()()|(

)()|()|(

HpHEpHpHEp

HpHEpEHp

Page 65: Chaining & uncertainty

Bayesian ReasoningBayesian Reasoning

Posterior probabilityPosterior probability of hypothesis of hypothesis HH upon upon observing evidence observing evidence EE

Expert determines : Expert determines :

User provides: Information about the evidence observedUser provides: Information about the evidence observed

)()|()()|(

)()|()|(

HpHEpHpHEp

HpHEpEHp

)|(),|(),(),( HEpHEpHpHp

Page 66: Chaining & uncertainty

Bayesian ReasoningBayesian Reasoning

Single evidence, multiple hypothesisSingle evidence, multiple hypothesis

Multiple evidence, multiple hypothesisMultiple evidence, multiple hypothesis

m

k

kk

iii

HpHEp

HpHEpEHp

1

)()|(

)()|()|(

m

k

kknkk

iiniini

HpHEpHEpHEp

HpHEpHEpHEpEEEHp

1

21

2121

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

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

Page 67: Chaining & uncertainty

Bayesian ReasoningBayesian Reasoning- an example- an example

p(Hp(Hii)) 0.400.40 0.350.35 0.250.25

p(Ep(E11|H|Hii)) 0.30.3 0.80.8 0.50.5

p(Ep(E22|H|Hii)) 0.90.9 0.00.0 0.70.7

p(Ep(E33|H|Hii)) 0.60.6 0.70.7 0.90.9

Hypothesis

i=1 i=2 i=3Probability

Table: The prior and conditional probabilities

Page 68: Chaining & uncertainty

Bayesian ReasoningBayesian Reasoning- an example- an example

Let, evidence ELet, evidence E3 3 is observed first.is observed first.

The expert system computes the posterior probabilities The expert system computes the posterior probabilities for all hypotheses according to the following equation:for all hypotheses according to the following equation:

3,2,1,)()|(

)()|()|(

1

3

33

iHpHEp

HpHEpEHp

m

k

kk

iii

32.025.09.035.07.040.06.0

25.09.0)|(

34.025.09.035.07.040.06.0

35.07.0)|(

34.025.09.035.07.040.06.0

40.06.0)|(

33

32

31

EHp

EHp

EHp

Page 69: Chaining & uncertainty

Bayesian ReasoningBayesian Reasoning- an example- an example

Suppose now that we observe evidence E1. The posterior Suppose now that we observe evidence E1. The posterior probabilities are calculated by this equation:probabilities are calculated by this equation:

Hence,Hence,

3,2,1;)()|()|(

)()|()|()|(

1

31

3131

iHpHEpHEp

HpHEpHEpEEHp

m

k

kkk

iiii

29.025.09.05.035.07.08.040.06.03.0

25.09.05.0)|(

52.025.09.05.035.07.08.040.06.03.0

35.07.08.0)|(

19.025.09.05.035.07.08.040.06.03.0

40.06.03.0)|(

313

312

311

EEHp

EEHp

EEHp

Page 70: Chaining & uncertainty

Bayesian ReasoningBayesian Reasoning- an example- an example

After observing evidence E2 as well , the expert system calculates After observing evidence E2 as well , the expert system calculates the final posterior probability for all hypothesis:the final posterior probability for all hypothesis:

Thus,Thus,

3,2,1;)()|()|()|(

)()|()|()|()|(

1

321

321321

iHpHEpHEpHEp

HpHEpHEpHEpEEEHp

m

k

kkkk

iiiii

55.0)|(

0)|(

45.0)|(

3213

3212

3211

EEEHp

EEEHp

EEEHp

Page 71: Chaining & uncertainty

Bayesian ReasoningBayesian Reasoning- an example- an example

Initially , the expert provided HInitially , the expert provided H11,H,H22,H,H33.. Only hypothesis HOnly hypothesis H11 and H and H33 remain under remain under

consideration after all evidences(Econsideration after all evidences(E11,E,E22 and E and E33) ) were observed. Hypothesis Hwere observed. Hypothesis H22 can now be can now be completely abandoned.completely abandoned.

PROSPECTOR, an expert system for mineral PROSPECTOR, an expert system for mineral exploration , was the first system to use exploration , was the first system to use Bayesian rules of evidence to compute Bayesian rules of evidence to compute

and propagate uncertainties throughout the and propagate uncertainties throughout the system. system.

)|( EHp

Page 72: Chaining & uncertainty

Certainty Factor TheoryCertainty Factor Theory

Page 73: Chaining & uncertainty

Certainty factors theory and evidential Certainty factors theory and evidential reasoningreasoning

Is a popular alternative to Bayesian Is a popular alternative to Bayesian reasoningreasoning

First introduced in First introduced in MYCINMYCIN , an expert , an expert system for the diagnosis and therapy of system for the diagnosis and therapy of blood infections and meningitisblood infections and meningitis

Uses Uses certainty factor certainty factor ((cfcf)), a number to , a number to measure the expert’s beliefsmeasure the expert’s beliefs

Page 74: Chaining & uncertainty

Basics of Certainty factorBasics of Certainty factor

Maximum value is +1 –Maximum value is +1 – definitely truedefinitely true Minimum value is -1 Minimum value is -1 – – definitely falsedefinitely false A positive value represents a degree of beliefA positive value represents a degree of belief A negative value represents a degree of A negative value represents a degree of

disbeliefdisbelief Knowledge base consists of a set of rules likeKnowledge base consists of a set of rules like

IFIF <evidence><evidence>

THENTHEN <hypothesis> {cf }<hypothesis> {cf }

CfCf represents belief in hypothesis represents belief in hypothesis HH given that given that evidenceevidence EE has occurred has occurred

Page 75: Chaining & uncertainty

Uncertainty terms and their interpretationUncertainty terms and their interpretation

TermTerm Certainty factorCertainty factorDefinitely notDefinitely not -1.0-1.0Almost certainly notAlmost certainly not -0.8-0.8Probably notProbably not -0.6-0.6Maybe notMaybe not -0.4-0.4UnknownUnknown -0.2 to +0.2-0.2 to +0.2MaybeMaybe +0.4+0.4Probably Probably +0.6+0.6Almost certainlyAlmost certainly +0.8+0.8DefinitelyDefinitely +1.0+1.0

Page 76: Chaining & uncertainty

Two FunctionsTwo Functions

Certainty factors theory is based on two functions :Certainty factors theory is based on two functions : Measure of belief Measure of belief MB(H,E)MB(H,E) – degree to which – degree to which

belief in hypothesis belief in hypothesis HH would be increased if would be increased if evidence evidence EE were observed were observed

Measure of disbelief Measure of disbelief MD(H,E)MD(H,E) – degree to which – degree to which disbelief in hypothesis disbelief in hypothesis HH would be increased by would be increased by observing the same evidence observing the same evidence EE

Page 77: Chaining & uncertainty

Formula for MB(H,E)Formula for MB(H,E)

The value of The value of MB(H,E)MB(H,E) is 1 if is 1 if p(H)p(H) is 1 is 1 Otherwise the value will beOtherwise the value will be

max[ p(H|E) , p(H)] – p(H)max[ p(H|E) , p(H)] – p(H)max[1,0] – p(H)max[1,0] – p(H)

p(H)p(H) is the prior probability of is the prior probability of HH being true being truep(H | E)p(H | E) is the probability that is the probability that H H is true when is true when

give evidence give evidence EE

Page 78: Chaining & uncertainty

Formula for MD(H,E)Formula for MD(H,E)

The value of The value of MD(H,E)MD(H,E) is 1 if is 1 if p(H)p(H) is 0 is 0 Otherwise the value will beOtherwise the value will be

min[ p(H | E), p(H)] – p(H)min[ p(H | E), p(H)] – p(H)min[1, 0] - p(H)min[1, 0] - p(H)

p(H)p(H) is the prior probability of is the prior probability of HH being true being truep(H | E)p(H | E) is the probability that is the probability that HH is true when is true when

give evidence give evidence EE

Page 79: Chaining & uncertainty

Formula for Certainty factorFormula for Certainty factor

To combine To combine MB(H,E)MB(H,E) and and MD(H, E)MD(H, E) the the following formula is usedfollowing formula is used

MB(H, E) – MD(H, E)MB(H, E) – MD(H, E)

cf = cf = 1- min[MB(H, E), MD(H,E)]1- min[MB(H, E), MD(H,E)]

Page 80: Chaining & uncertainty

An exampleAn example

IFIF AA isis XX THE THE BB isis YY Often the expert may not be certain that the rule Often the expert may not be certain that the rule

holdsholds So the expert may associate the rule with a So the expert may associate the rule with a

certainty factorcertainty factor IF IF AA isis X X THEN THEN BB isis Y {cf 0.7}Y {cf 0.7} BB isis Z {cf 0.2}Z {cf 0.2}

Page 81: Chaining & uncertainty

Certainty factor calculationCertainty factor calculation

The net certainty factor for a single rule The net certainty factor for a single rule cf(H,E) can be calculated by this formulacf(H,E) can be calculated by this formula

cf(H,E) = cf(E) cf(H,E) = cf(E) × cf× cfExampleExample

IFIF the sky is clearthe sky is clear

THEN THEN the forecast is sunny { the forecast is sunny { cf 0.8cf 0.8}}

if certainty factor of if certainty factor of the sky is clearthe sky is clear is 0.5 then is 0.5 then

cf(H, E) = 0.5 * 0.8 = 0.4 cf(H, E) = 0.5 * 0.8 = 0.4

so the certainty is It so the certainty is It may bemay be sunny sunny

Page 82: Chaining & uncertainty

Certainty factors for rules with multiple Certainty factors for rules with multiple

antecedentsantecedents For conjunctive rules asFor conjunctive rules as

IFIF sky is clear sky is clear

ANDAND the forecast is sunny the forecast is sunny

THENTHEN the action is 'wear sunglasses' {cf the action is 'wear sunglasses' {cf 0.8}0.8}

sky is clear has certainty of 0.9 and the certainty sky is clear has certainty of 0.9 and the certainty of the forecast is sunny is 0.7 thenof the forecast is sunny is 0.7 then

cf(H, E1cf(H, E1 ∩ E2 ∩ E2) = min [0.9,0.7 ] * 0.8 ) = min [0.9,0.7 ] * 0.8

= 0.7 * 0.8 = 0.7 * 0.8

= 0.56( = 0.56( probablyprobably))

Page 83: Chaining & uncertainty

Certainty factors for rules with multiple Certainty factors for rules with multiple

antecedentsantecedents For disjunctive rules asFor disjunctive rules as

IFIF sky is overcastsky is overcast

OROR the forecast is rainthe forecast is rain

THENTHEN the action is 'take an umbrella'{the action is 'take an umbrella'{cf 0.9cf 0.9}}

certainty of certainty of sky is overcastsky is overcast is 0.6 and certainty is 0.6 and certainty of of the forecast is rain is 0.8 thenthe forecast is rain is 0.8 then

cf(H, E1 cf(H, E1 υ E2υ E2) = max) = max [0.6, 0.8] * 0.9 [0.6, 0.8] * 0.9

= 0.8 * 0.9= 0.8 * 0.9

= 0.72 (= 0.72 (almost certainlyalmost certainly))

Page 84: Chaining & uncertainty

Is Bayesian reasoning always usable?Is Bayesian reasoning always usable?

Probability theory works well in such areas as Probability theory works well in such areas as forecasting ad planning, where statistical data is forecasting ad planning, where statistical data is usually available usually available

To apply the Bayesian approach the conditional To apply the Bayesian approach the conditional independence of evidence is required independence of evidence is required

But reliable statistical information is not always But reliable statistical information is not always available or the conditional independence of available or the conditional independence of

evidence is not fulfilledevidence is not fulfilled

Page 85: Chaining & uncertainty

Certainty factors theory in rescueCertainty factors theory in rescue

Certainty factors theory lacks the Certainty factors theory lacks the mathematical correctness like the mathematical correctness like the probability theoryprobability theory

But outperforms subjective Bayesian But outperforms subjective Bayesian reasoning in areas as diagnostics, specially reasoning in areas as diagnostics, specially in medicine in medicine

Certainty factors come from the experts Certainty factors come from the experts knowledge ad his/her intuitive judgmentsknowledge ad his/her intuitive judgments

Used where probabilities are not known or Used where probabilities are not known or too difficult or expensive to obtain too difficult or expensive to obtain

Page 86: Chaining & uncertainty

Common problemCommon problem

Finding an expert able to quantify personal, Finding an expert able to quantify personal, subjective ad qualitative informationsubjective ad qualitative information

Humans are easily biasedHumans are easily biased The choice of a uncertainty management The choice of a uncertainty management

technique strongly depends on the existing technique strongly depends on the existing

domain expertsdomain experts

Page 87: Chaining & uncertainty

Last words on uncertainty............Last words on uncertainty............

The Bayesian method is likely to be most The Bayesian method is likely to be most appropriate if reliable statistical data exists, appropriate if reliable statistical data exists, engineer is able to lead, and expert is engineer is able to lead, and expert is available for serious decision analytical available for serious decision analytical conversationsconversations

In absence of the conditions, the approach In absence of the conditions, the approach may be too arbitrary or biasedmay be too arbitrary or biased

Belief propagation is exponentially complex Belief propagation is exponentially complex and is impractical for large knowledge and is impractical for large knowledge base(KB) base(KB)

Page 88: Chaining & uncertainty

Last words on uncertainty..........Last words on uncertainty..........

The certainty factors technique , despite the lack The certainty factors technique , despite the lack of a formal foundation, offers a simple approach of a formal foundation, offers a simple approach for dealing with uncertainties in expert systemsfor dealing with uncertainties in expert systems

Delivers result acceptable in may applications Delivers result acceptable in may applications