Top Banner
es are based on Negnevitsky, Pearson Education, 2005 es are based on Negnevitsky, Pearson Education, 2005 Lecture 3 Lecture 3 Uncertainty management in Uncertainty management in rule-based expert systems rule-based expert systems Introduction, or what is Introduction, or what is uncertainty? uncertainty? Basic probability theory Basic probability theory Bayesian reasoning Bayesian reasoning Bias of the Bayesian Bias of the Bayesian method method Certainty factors theory and Certainty factors theory and evidential reasoning evidential reasoning Summary Summary
61

Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Jan 15, 2016

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 1

Lecture 3Lecture 3Uncertainty management in rule-Uncertainty management in rule-based expert systemsbased expert systems Introduction, or what is uncertainty?Introduction, or what is uncertainty? Basic probability theoryBasic probability theory Bayesian reasoningBayesian reasoning Bias of the Bayesian Bias of the Bayesian methodmethod Certainty factors theory and evidential Certainty factors theory and evidential

reasoningreasoning SummarySummary

Page 2: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 2

Introduction, or what is uncertainty?Introduction, or what is uncertainty? Information can be incomplete, inconsistent, Information can be incomplete, inconsistent,

uncertain, or all three. In other words, information uncertain, or all three. In other words, information is often unsuitable for solving a problem.is often unsuitable for solving a problem.

UncertaintyUncertainty is defined as the lack of the exact is defined as the lack of the exact knowledge that would enable us to reach a perfectly knowledge that would enable us to reach a perfectly reliable conclusion. Classical logic permits only reliable conclusion. Classical logic permits only exact reasoning. It assumes that perfect knowledge exact reasoning. It assumes that perfect knowledge always exists and the always exists and the law of the excluded middlelaw of the excluded middle can always be applied:can always be applied:

IFIF A A is trueis true IF IF A A is false is false THEN THEN AA is not false is not false THEN THEN AA is not is not truetrue

Page 3: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 3

Variety of logicsVariety of logics– Propositional LogicsPropositional Logics

» These are exclusively concerned with the logic of sentential operators such These are exclusively concerned with the logic of sentential operators such as "and", "or", "not". as "and", "or", "not".

– Predicate logicsPredicate logics» These usually cover propositional logic and the logic of quantifiers such as These usually cover propositional logic and the logic of quantifiers such as

"all" and "some". "all" and "some".

– Modal logicsModal logics» Modal logics are usually propositional logics with added propositional Modal logics are usually propositional logics with added propositional

operators concerning, for example, necessity, time, knowledge, belief, operators concerning, for example, necessity, time, knowledge, belief, provability provability

– Non-monotonic logicsNon-monotonic logics» Logics (devised for AI) in which adding premises may diminish the set of Logics (devised for AI) in which adding premises may diminish the set of

derivable conclusions. derivable conclusions.

Page 4: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 4

Weak implicationsWeak implications.. Domain experts and Domain experts and knowledge engineers have the painful task of knowledge engineers have the painful task of establishing concrete correlationsestablishing concrete correlations between IF between IF (condition) and THEN (action) parts of the rules. (condition) and THEN (action) parts of the rules. Therefore, expert systems need to have the ability to Therefore, expert systems need to have the ability to handle vague associations, for example by handle vague associations, for example by accepting the degree of correlations as numerical accepting the degree of correlations as numerical certainty factors.certainty factors.

For example:For example: IFIF today is rainingtoday is raining

THENTHEN tomorrow will rain {with probability tomorrow will rain {with probability pp}}

Sources of uncertain knowledgeSources of uncertain knowledge

Page 5: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 5

Imprecise languageImprecise language.. Our natural language is Our natural language is ambiguous and imprecise. We describe facts with ambiguous and imprecise. We describe facts with such terms as such terms as oftenoften and and sometimessometimes, , frequentlyfrequently and and hardly everhardly ever. As a result, it can be difficult to . As a result, it can be difficult to express knowledge in the precise IF-THEN form of express knowledge in the precise IF-THEN form of production rules. production rules.

However, if the meaning of the facts is However, if the meaning of the facts is quantifiedquantified, it , it can be used in expert systems. can be used in expert systems.

In 1944, Ray Simpson asked 355 high school and In 1944, Ray Simpson asked 355 high school and college students to place 20 terms like college students to place 20 terms like oftenoften on a on a scale between 1 and 100. In 1968, Milton Hakel scale between 1 and 100. In 1968, Milton Hakel repeated this experiment.repeated this experiment.

Page 6: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 6

Quantification of ambiguous and imprecise Quantification of ambiguous and imprecise terms on a time-frequency scaleterms on a time-frequency scale

Term

AlwaysVery oftenUsuallyOftenGenerallyFrequentlyRather oftenAbout as often as notNow and thenSometimesOccasionallyOnce in a whileNot oftenUsually notSeldomHardly everVery seldomRarelyAlmost neverNever

Mean value

99888578787365502020201513101076530

Term

AlwaysVery oftenUsuallyOften

GenerallyFrequentlyRather often

About as often as notNow and thenSometimesOccasionallyOnce in a whileNot oftenUsually notSeldomHardly everVery seldomRarelyAlmost neverNever

Mean value

10087797474727250342928221616987520

Milton Hakel (1968)Ray Simpson (1944)

Page 7: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 7

Unknown dataUnknown data.. When the data is incomplete or When the data is incomplete or missing, the only solution is to accept the value missing, the only solution is to accept the value “unknown” and proceed to an “unknown” and proceed to an approximate reasoningapproximate reasoning with this value.with this value.

Combining the views of different expertsCombining the views of different experts.. Large Large expert systems usually combine the knowledge and expert systems usually combine the knowledge and expertise of a number of experts. expertise of a number of experts. Experts often have contradictory opinions and Experts often have contradictory opinions and

produce conflicting rules. To resolve the conflict, the produce conflicting rules. To resolve the conflict, the knowledge engineer has to attach a knowledge engineer has to attach a weightweight to each to each expert and then calculate the composite conclusion. expert and then calculate the composite conclusion.

no systematic method exists to obtain these weights. no systematic method exists to obtain these weights.

Page 8: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 8

Basic probability theoryBasic probability theory

The concept of probability has a long history that The concept of probability has a long history that goes back thousands of years when words like goes back thousands of years when words like “probably”, “likely”, “maybe”, “perhaps” and “probably”, “likely”, “maybe”, “perhaps” and “possibly” were introduced into spoken languages. “possibly” were introduced into spoken languages. However, the mathematical theory of probability However, the mathematical theory of probability was formulated only in the 17th century.was formulated only in the 17th century.

The The probabilityprobability of an event is the proportion of of an event is the proportion of cases in which the event occurs. Probability can cases in which the event occurs. Probability can also be defined as a also be defined as a scientific measure of chancescientific measure of chance..

Page 9: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 9

Probability can be expressed mathematically as a Probability can be expressed mathematically as a numerical index with a range between zero (an numerical index with a range between zero (an absolute impossibility) to unity (an absolute absolute impossibility) to unity (an absolute certainty).certainty).

Most events have a probability index strictly Most events have a probability index strictly between 0 and 1, which means that each event has between 0 and 1, which means that each event has at leastat least two possible outcomes: favourable outcome two possible outcomes: favourable outcome or success, and unfavourable outcome or failure.or success, and unfavourable outcome or failure.

outcomes possible of number the

successesof number thesuccessP

outcomes possible of number the

failures of number thefailureP

Page 10: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 10

If If ss is the number of times success can occur, and is the number of times success can occur, and ff is the number of times failure can occur, thenis the number of times failure can occur, then

fs

spsuccessP

fs

fqfailureP

and and p + q = 1

If we throw a coin, the probability of getting a head If we throw a coin, the probability of getting a head will be equal to the probability of getting a tail. In a will be equal to the probability of getting a tail. In a single throw, single throw, ss = = ff = 1, and therefore the probability = 1, and therefore the probability of getting a head (or a tail) is 0.5.of getting a head (or a tail) is 0.5.

Page 11: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 11

Let Let AA be an event in the world and be an event in the world and BB be another event. be another event. Suppose that events Suppose that events AA and and BB are not mutually are not mutually exclusive, but occur conditionally on the occurrence of exclusive, but occur conditionally on the occurrence of the other. The probability that event the other. The probability that event AA will occur if will occur if event event BB occurs is called the occurs is called the conditional probabilityconditional probability. . Conditional probability is denoted mathematically as Conditional probability is denoted mathematically as pp((AABB)) in which the vertical bar represents in which the vertical bar represents GIVENGIVEN and and the complete probability expression is interpreted as the complete probability expression is interpreted as “Conditional probability of event A occurring given “Conditional probability of event A occurring given that event B has occurred”that event B has occurred”..

Conditional probabilityConditional probability

occur can B times of number the

occur can B and A times of number theBAp

Page 12: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 12

The number of times The number of times AA and and BB can occur, or the can occur, or the probability that both probability that both AA and and BB will occur, is called will occur, is called the the joint probabilityjoint probability of of AA and and BB. It is represented . It is represented mathematically as mathematically as pp((AABB)). The number of ways . The number of ways BB can occur is the probability of can occur is the probability of BB, , pp((BB), and thus), and thus

Bp

BApBAp

Similarly, the conditional probability of event Similarly, the conditional probability of event BB occurring given that event occurring given that event AA has occurred equals has occurred equals

P(B|A) = pp((BBAA)) / p(A) / p(A)

Page 13: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 13

Hence,Hence,

Substituting the last equationSubstituting the last equation into the equationinto the equation

ApABpABp

andand

Bp

BApBAp

yields the yields the Bayesian ruleBayesian rule::

pp((AABB)) = p(A|B) = p(A|B) × p(B)× p(B)

Page 14: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 14

where:p(AB) is the conditional probability that event A

occurs given that event B has occurred;p(BA) is the conditional probability of event B

occurring given that event A has occurred;p(A) is the probability of event A occurring;p(B) is the probability of event B occurring.

Bayesian ruleBayesian rule

Bp

ApABpBAp

Page 15: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 15

The joint probabilityThe joint probability

i

n

ii

n

ii BpBApBAp

11

AB 4

B 3

B 1

B 2

Page 16: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 16

If the occurrence of event If the occurrence of event AA depends on only two depends on only two

mutually exclusive events, mutually exclusive events, BB and NOT and NOT BB, we obtain:, we obtain:

where where is the logical function NOT. is the logical function NOT.

Similarly,Similarly,

Substituting this equation into the Bayesian rule yields:Substituting this equation into the Bayesian rule yields:

ApABpApABp

ApABpBAp

Page 17: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 17

Suppose all rules in the knowledge base areSuppose all rules in the knowledge base are represented in the following form:represented in the following form:

IFIF HH is true is trueTHENTHEN EE is true {with probability is true {with probability pp}}

This rule implies that if event This rule implies that if event HH occurs, then the occurs, then the probability that event probability that event EE will occur is will occur is pp..

In expert systems, In expert systems, HH usually represents a hypothesis usually represents a hypothesisand and EE denotes evidence to support this hypothesis. denotes evidence to support this hypothesis.

Bayesian reasoningBayesian reasoning

Page 18: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 18

The Bayesian rule expressed in terms of hypothesesThe Bayesian rule expressed in terms of hypotheses

and evidence looks like this:and evidence looks like this:

HpHEpHpHEp

HpHEpEHp

where:where:pp((HH) is the prior probability of hypothesis ) is the prior probability of hypothesis HH being true; being true;pp((EEHH) is the probability that hypothesis ) is the probability that hypothesis HH being true being true

will result in evidence will result in evidence EE;;pp((HH) is the prior probability of hypothesis ) is the prior probability of hypothesis HH being being

false;false;pp((EEHH) is the probability of finding evidence ) is the probability of finding evidence EE even even

when hypothesis when hypothesis HH is false. is false.

Page 19: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 19

In expert systems, the probabilities required to solve In expert systems, the probabilities required to solve a problem are provided by experts. An expert a problem are provided by experts. An expert determines the determines the prior probabilitiesprior probabilities for possible for possible hypotheses hypotheses pp((HH) and ) and pp((HH), and also the ), and also the conditional probabilitiesconditional probabilities for observing evidence for observing evidence EE if hypothesis if hypothesis HH is true, is true, pp((EEHH), and if hypothesis ), and if hypothesis HH is false, is false, pp((EEHH). ).

Users provide information about the evidence Users provide information about the evidence observed and the expert system computes observed and the expert system computes pp((HHEE) ) for hypothesis for hypothesis HH in light of the user-supplied in light of the user-supplied evidence evidence EE. Probability . Probability pp((HHEE) is called the ) is called the posterior probabilityposterior probability of hypothesis of hypothesis HH upon upon observing evidence observing evidence EE..

Page 20: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 20

We can take into account both multiple hypothesesWe can take into account both multiple hypotheses HH11, , HH22,..., ,..., HHmm and multiple evidences and multiple evidences EE11, , EE22,..., ,..., EEnn. .

The hypotheses as well as the evidences must be The hypotheses as well as the evidences must be mutually exclusive and exhaustive.mutually exclusive and exhaustive.

Single evidence Single evidence EE and multiple hypotheses and multiple hypotheses follow:follow:

Multiple evidences and multiple hypothesesMultiple evidences and multiple hypotheses follow:follow:

m

kkk

iii

HpHEp

HpHEpEHp

1

m

kkkn

iinni

HpHE . . . E Ep

HpHE . . . E EpE . . . E EHp

121

2121

Page 21: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 21

This requires to obtain the conditional probabilities This requires to obtain the conditional probabilities of all possible combinations of evidences for all of all possible combinations of evidences for all hypotheses, and thus places an enormous burden hypotheses, and thus places an enormous burden on the expert. on the expert.

Therefore, in expert systems, Therefore, in expert systems, conditional conditional independence among different evidences assumedindependence among different evidences assumed. . Thus, instead of the unworkable Thus, instead of the unworkable equationequation, we , we attain:attain:

m

kkknkk

iiniini

HpHEp . . . HEpHEp

HpHEpHEpHEpE . . . E EHp

121

2121

. . .

Page 22: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 22

Ranking potentially true hypothesesRanking potentially true hypotheses

Let us consider a simple example.Let us consider a simple example.

Suppose an expert, given three conditionally Suppose an expert, given three conditionally independent evidences independent evidences EE11, , EE22 and and EE33, creates three , creates three

mutually exclusive and exhaustive hypotheses mutually exclusive and exhaustive hypotheses HH11, , HH22

and and HH33, and provides prior probabilities for these , and provides prior probabilities for these

hypotheses – hypotheses – pp((HH11), ), pp((HH22) and ) and pp((HH33), respectively. ), respectively.

The expert also determines the conditional The expert also determines the conditional probabilities of observing each evidence for all probabilities of observing each evidence for all possible hypotheses. possible hypotheses.

Page 23: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 23

The prior and conditional probabilitiesThe prior and conditional probabilitiesH y p o t h e s i s

P r o b a b i l i t y = 1i = 2i = 3i

0 . 4 0

0 . 9

0 . 6

0 . 3

0 . 3 5

0 . 0

0 . 7

0 . 8

0 . 2 5

0 . 7

0 . 9

0 . 5

iHp

iHEp 1

iHEp 2

iHEp 3

Assume that we first observe evidence Assume that we first observe evidence EE33. The expert . The expert

system computes the posterior probabilities for all system computes the posterior probabilities for all hypotheses ashypotheses as

Page 24: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 24

Thus,Thus,

3 2, 1,= ,3

13

33 i

HpHEp

HpHEpEHp

kkk

iii

0.3425.09.0 + 35.07.0 + 0.400.6

0.400.631

EHp

0.3425.09.0 + 35.07.0 + 0.400.6

35.07.032

EHp

0.3225.09.0 + 35.07.0 + 0.400.6

25.09.033

EHp

After evidence After evidence EE33 is observed, belief in hypothesis is observed, belief in hypothesis HH22

increases and becomes equal to belief in hypothesis increases and becomes equal to belief in hypothesis HH11. Belief in hypothesis . Belief in hypothesis HH33 also increases and even also increases and even

nearly reaches beliefs in hypotheses nearly reaches beliefs in hypotheses HH11 and and HH22..

Page 25: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 25

Suppose now that we observe evidence Suppose now that we observe evidence EE11. The . The

posterior probabilities are calculated asposterior probabilities are calculated as

3 2, 1,= ,

3

131

3131 i

HpHEpHEp

HpHEpHEpEEHp

kkii

iiii

Hence,Hence,

0.1925.09.00.5 + 35.07.00.8 + 0.400.60.3

0.400.60.3311

EEHp

0.5225.09.00.5 + 35.07.00.8 + 0.400.60.3

35.07.00.8312

EEHp

0.2925.09.00.5 + 35.07.00.8 + 0.400.60.3

25.09.00.5313

EEHp

Hypothesis Hypothesis HH22 has now become the most likely one. has now become the most likely one.

Page 26: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 26

After observing evidence After observing evidence EE22, the final posterior , the final posterior

probabilities for all hypotheses are calculated:probabilities for all hypotheses are calculated:

Although the initial ranking was Although the initial ranking was HH11, , HH22 and and HH33, only , only

hypotheses hypotheses HH11 and and HH33 remain under consideration after remain under consideration after

all evidences (all evidences (EE11, , EE22 and and EE33) were observed.) were observed.

3 2, 1,= ,

3

1321

321321 i

HpHEpHEpHEp

HpHEpHEpHEpEEEHp

kkiii

iiiii

0.4525.09.00.70.5 + 35.07.00.00.8 + 0.400.60.90.3

0.400.60.90.33211

EEEHp

025.09.00.70.5 + 35.07.00.00.8 + 0.400.60.90.3

35.07.00.00.83212

EEEHp

0.5525.09.00.70.5 + 35.07.00.00.8 + 0.400.60.90.3

25.09.00.70.53213

EEEHp

Page 27: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 27

22ndnd example (1) example (1)

Suppose there is a school having 60% boys Suppose there is a school having 60% boys and 40% girls as students. The female and 40% girls as students. The female students wear trousers or skirts in equal students wear trousers or skirts in equal numbers; the boys all wear trousers. An numbers; the boys all wear trousers. An observer sees a (random) student from a observer sees a (random) student from a distance; all the observer can see is that this distance; all the observer can see is that this student is wearing trousers. What is the student is wearing trousers. What is the probability this student is a girl? probability this student is a girl?

Page 28: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 28

an example (2)an example (2) The event The event AA is that the student observed is a is that the student observed is a

girlgirl, and the event , and the event BB is that the student is that the student observed is observed is wearing trouserswearing trousers. .

To compute P(To compute P(AA||BB), we first need to know:), we first need to know:– P(P(AA), or the probability that the student is a girl ), or the probability that the student is a girl

regardless of any other information. Since the regardless of any other information. Since the observers sees a random student, meaning that all observers sees a random student, meaning that all students have the same probability of being students have the same probability of being observed, and the fraction of girls among the observed, and the fraction of girls among the students is 40%, this probability equals 0.4. students is 40%, this probability equals 0.4.

Page 29: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 29

an example (3)an example (3)

– P(P(BB||AA), or the probability of the student wearing ), or the probability of the student wearing trousers given that the student is a girl. As they trousers given that the student is a girl. As they are as likely to wear skirts as trousers, this is 0.5. are as likely to wear skirts as trousers, this is 0.5.

– P(P(BB), or the probability of a (randomly selected) ), or the probability of a (randomly selected) student wearing trousers regardless of any other student wearing trousers regardless of any other information. information.

Since P(Since P(BB) = P() = P(BB||AA)P()P(AA) + P() + P(BB||AA')P(')P(AA'), '),

this is 0.5×0.4 + 1×0.6 = 0.8.this is 0.5×0.4 + 1×0.6 = 0.8.

Page 30: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 30

an example (4)an example (4)

Given all this information, the probability Given all this information, the probability of the observer having spotted a girl given of the observer having spotted a girl given that the observed student is wearing that the observed student is wearing trousers can be computed by substituting trousers can be computed by substituting these values in the formula:these values in the formula:

Page 31: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 31

Forecast: Bayesian accumulation of Forecast: Bayesian accumulation of evidenceevidence

Based on London weather for March 1982Based on London weather for March 1982 It gives the minimum and maximum It gives the minimum and maximum

temperatures, rainfall and sunshine for each temperatures, rainfall and sunshine for each dayday– If rainfall is zero it is a dry dayIf rainfall is zero it is a dry day

The expert system should display two The expert system should display two possible outcomes: (i.e. hypotheses H) possible outcomes: (i.e. hypotheses H) tomorrow is raintomorrow is rain and and tomorrow is drytomorrow is dry (with (with likelihood respectively)likelihood respectively)

Page 32: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 32

H: H: rain tomorrowrain tomorrow LS=p(E|H)/p(E|LS=p(E|H)/p(E|¬¬H) it represents a measure H) it represents a measure

of the expert belief in hypothesis H if of the expert belief in hypothesis H if evidence E is present. It is called likelihood evidence E is present. It is called likelihood of sufficiency.of sufficiency.– In this case, LS is the probability of getting In this case, LS is the probability of getting rain rain

todaytoday if we have if we have rain tomorrowrain tomorrow divided by the divided by the probability of getting probability of getting rain todayrain today if there is if there is no no rain tomorrowrain tomorrow..

Page 33: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 33

LN=p(LN=p(¬¬ E|H)/p( E|H)/p(¬¬ E| E|¬¬H) it represents a H) it represents a measure of discredit to hypothesis H if measure of discredit to hypothesis H if evidence E is missing. It is called likelihood evidence E is missing. It is called likelihood of necessity.of necessity.– In the case, LN is the probability of In the case, LN is the probability of not getting not getting

rain todayrain today if we have if we have rain tomorrowrain tomorrow divided by divided by the probability of the probability of not getting rain todaynot getting rain today if there if there is is no rain tomorrowno rain tomorrow..

Page 34: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 34

The expert must provide both LN and LS The expert must provide both LN and LS independentlyindependently

High values LS (LS>>1) indicate that the High values LS (LS>>1) indicate that the rule strongly supports the hypothesis if the rule strongly supports the hypothesis if the evidence is observedevidence is observed

Low values of LN (LN<<1) suggest that the Low values of LN (LN<<1) suggest that the rule also strongly oppose the hypothesis if rule also strongly oppose the hypothesis if the evidence is missingthe evidence is missing

Page 35: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 35

Rule 1:Rule 1: If today is rain {LS 2.5 LN 0.6}If today is rain {LS 2.5 LN 0.6}

Then tomorrow is rain {prior 0.5}Then tomorrow is rain {prior 0.5}

Rule 2:Rule 2: If today is dry {LS 1.6 LN 0.4}If today is dry {LS 1.6 LN 0.4}

Then tomorrow is dry {prior 0.5}Then tomorrow is dry {prior 0.5}

Page 36: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 36

Rule 1 tells us that if it is Rule 1 tells us that if it is raining todayraining today, , there is a high probability of there is a high probability of rain tomorrowrain tomorrow (LS 2.5). But even there is no rain today, or (LS 2.5). But even there is no rain today, or today is drytoday is dry, there is still some chance of , there is still some chance of having having rain tomorrowrain tomorrow (LN =0.6) (LN =0.6)

Page 37: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 37

Prior oddsPrior odds O(H)=p(H)/(1-p(H))O(H)=p(H)/(1-p(H))

In order to obtain the posterior odds, the priorIn order to obtain the posterior odds, the priorodds are updated by LS if the evidence is odds are updated by LS if the evidence is truetrue and andby LN if it is by LN if it is falsefalse

O(H|E)=LS*O(H)O(H|E)=LS*O(H)O(H|O(H|¬¬E)=LN*O(H)E)=LN*O(H)

Page 38: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 38

p(H|E)=O(H|E)/(1+O(H|E))p(H|E)=O(H|E)/(1+O(H|E)) p(H|p(H|¬¬E)=O(H|E)=O(H|¬¬E)/(1+O(H|E)/(1+O(H|¬¬E))E)) Now suppose that Now suppose that today is raintoday is rain. . Rule 1Rule 1 is fired and is fired and

the prior probability of the prior probability of tomorrow is raintomorrow is rain is converted is converted into the prior odds:into the prior odds:– O( tomorrow is rain)=0.5/(1-0.5)=1O( tomorrow is rain)=0.5/(1-0.5)=1– the evidence “the evidence “today is rain”today is rain” is true, therefore: is true, therefore: O( tomorrow is rain | today is rain) =O( tomorrow is rain | today is rain) =LSLS*O(H)=2.5*1=2.5*O(H)=2.5*1=2.5– P (tomorrow is rain| today is rain) = 2.5/(1+2.5)=0.71P (tomorrow is rain| today is rain) = 2.5/(1+2.5)=0.71– Increasing the probability from 0.5 to 0.71 Increasing the probability from 0.5 to 0.71

Page 39: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 39

Rule 2Rule 2 is fired and the prior probability of is fired and the prior probability of tomorrow is drytomorrow is dry is converted into the prior odds: is converted into the prior odds:– O( tomorrow is dry)=0.5/(1-0.5)=1O( tomorrow is dry)=0.5/(1-0.5)=1

– the evidence “the evidence “today is rain”today is rain” is true (would reduce the is true (would reduce the odds), therefore: odds), therefore:

O( tomorrow is dry | today is rain) =O( tomorrow is dry | today is rain) =LNLN*O(H)=0.4*1=0.4*O(H)=0.4*1=0.4

– p( tomorrow is dry| today is rain) = 0.4/(1+0.4)=0.29p( tomorrow is dry| today is rain) = 0.4/(1+0.4)=0.29

– diminishing the probability of diminishing the probability of tomorrow is drytomorrow is dry from 0.5 from 0.5 to 0.29 (because of the evidence of to 0.29 (because of the evidence of today is raintoday is rain))

Page 40: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 40

Now suppose that Now suppose that today is drytoday is dry. . That is: H That is: H today is drytoday is dry

– By following the same procedure, we have:By following the same procedure, we have:– There is a 62% chance of it being dry tomorrowThere is a 62% chance of it being dry tomorrow– And a 38% chance of it raining tomorrowAnd a 38% chance of it raining tomorrow

Page 41: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 41

The framework for Bayesian reasoning requires The framework for Bayesian reasoning requires probability values as primary inputs. The probability values as primary inputs. The assessment of these values usually involves human assessment of these values usually involves human judgement. However, psychological research judgement. However, psychological research shows that humans either cannot elicit probability shows that humans either cannot elicit probability values consistent with the Bayesian rules.values consistent with the Bayesian rules.

This suggests that the conditional probabilities may This suggests that the conditional probabilities may be inconsistent with the prior probabilities given by be inconsistent with the prior probabilities given by the expert.the expert.

Bias of the Bayesian MethodBias of the Bayesian Method

Page 42: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 42

Consider, for example, a car that does not start and Consider, for example, a car that does not start and makes odd noises when you press the starter. The makes odd noises when you press the starter. The conditional probability of the starter being faulty if conditional probability of the starter being faulty if the car makes odd noises may be expressed as:the car makes odd noises may be expressed as:

IFIF the symptom is “odd noises”the symptom is “odd noises”THEN the starter is bad {with probability 0.7}THEN the starter is bad {with probability 0.7}

Consider, for example, a car that does not start and Consider, for example, a car that does not start and makes odd noises when you press the starter. The makes odd noises when you press the starter. The conditional probability of the starter being faulty if conditional probability of the starter being faulty if the car makes odd noises may be expressed as:the car makes odd noises may be expressed as:

pp(starter is not bad(starter is not badodd noises) = odd noises) =

== p p(starter is good(starter is goododd noises) = 1odd noises) = 10.7 = 0.30.7 = 0.3

Page 43: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 43

Therefore, we can obtain a companion rule that statesTherefore, we can obtain a companion rule that statesIFIF the symptom is “odd noises”the symptom is “odd noises”THEN the starter is good {with probability 0.3}THEN the starter is good {with probability 0.3}

Domain experts do not deal with conditional Domain experts do not deal with conditional probabilities and often deny the very existence of the probabilities and often deny the very existence of the hidden implicit probabilityhidden implicit probability (0.3 in our example). (0.3 in our example).

We would also use available statistical information We would also use available statistical information and empirical studies to derive the following rules:and empirical studies to derive the following rules:

IFIF the starter is bad the starter is badTHEN the symptom is “odd noises” {probability 0.85}THEN the symptom is “odd noises” {probability 0.85}

IFIF the starter is bad the starter is badTHEN the symptom is not “odd noises” {probability 0.15}THEN the symptom is not “odd noises” {probability 0.15}

Page 44: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 44

To use the Bayesian rule, we still need the To use the Bayesian rule, we still need the prior prior probabilityprobability, the probability that the starter is bad if , the probability that the starter is bad if the car does not start. Suppose, the expert supplies us the car does not start. Suppose, the expert supplies us the value of 5 per cent. Now we can apply the the value of 5 per cent. Now we can apply the Bayesian rule to obtain:Bayesian rule to obtain:

0.23 0.950.15 + 0.050.85

0.050.85

noises oddbad is starterp

The number obtained is significantly lower The number obtained is significantly lower than the expert’s estimate of 0.7 given at the than the expert’s estimate of 0.7 given at the beginning of this section.beginning of this section.

The reason for the inconsistency is that the expert The reason for the inconsistency is that the expert made different assumptions when assessing the made different assumptions when assessing the conditional and prior probabilities.conditional and prior probabilities.

Page 45: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 45

Certainty factors theory and Certainty factors theory and evidential reasoning evidential reasoning

Certainty factors theory is a popular alternative to Certainty factors theory is a popular alternative to Bayesian reasoning. Bayesian reasoning.

A A certainty factorcertainty factor ( (cf cf ), a number to measure the ), a number to measure the expert’s belief. The maximum value of the expert’s belief. The maximum value of the certainty factor is, say, +1.0 (definitely true) and certainty factor is, say, +1.0 (definitely true) and the minimum the minimum 1.0 (definitely false). For example, if 1.0 (definitely false). For example, if the expert states that some evidence is almost the expert states that some evidence is almost certainly true, a certainly true, a cfcf value of 0.8 would be assigned value of 0.8 would be assigned to this evidence.to this evidence.

Page 46: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 46

Uncertain terms and their Uncertain terms and their interpretation in MYCINinterpretation in MYCIN

Term

Definitely notAlmost certainly notProbably notMaybe notUnknown

Certainty Factor

+0.4+0.6+0.8+1.0

MaybeProbablyAlmost certainlyDefinitely

1.0_

0.8_

0.6_

0.4_

0.2 to +0.2_

Page 47: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 47

In expert systems with certainty factors, the In expert systems with certainty factors, the knowledge base consists of a set of rules that have knowledge base consists of a set of rules that have the following syntax:the following syntax:

IFIF evidenceevidenceTHEN THEN hypothesishypothesis { {cf cf }}

where where cfcf represents belief in hypothesis represents belief in hypothesis HH given given that evidence that evidence EE has occurred. has occurred.

Page 48: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 48

The certainty factors theory is based on two functions: The certainty factors theory is based on two functions: measure of belief measure of belief MBMB((HH,,EE), and measure of disbelief ), and measure of disbelief MDMD((HH,,EE).).

if p(H ) = 1

MB (H, E) =

1

max 1, 0 p(H )

max p(H E), p(H ) p(H )

otherwise

if p(H ) = 0

MD (H, E) =

1

min 1, 0 p(H )

min p(H E), p(H ) p(H )

otherwise

pp((HH) is the prior probability of hypothesis ) is the prior probability of hypothesis HH being true; being true;pp((HHEE) is the probability that hypothesis ) is the probability that hypothesis HH is true given is true given

evidence evidence EE..

Page 49: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 49

The values of The values of MBMB((HH, , EE) and ) and MDMD((HH, , EE) range ) range between 0 and 1. The strength of belief or between 0 and 1. The strength of belief or disbelief in hypothesis disbelief in hypothesis HH depends on the kind of depends on the kind of evidence evidence EE observed. Some facts may increase the observed. Some facts may increase the strength of belief, but some increase the strength of strength of belief, but some increase the strength of disbelief.disbelief.

The total strength of belief or disbelief in a The total strength of belief or disbelief in a hypothesis:hypothesis:

EH, MD,EH,MBmin-

EH,MDEH,MB = cf1

Page 50: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 50

Example: Example: Consider a simple rule: Consider a simple rule:

IFIF AA is is XXTHEN THEN BB is is YYAn expert may not be absolutely certain that this rule An expert may not be absolutely certain that this rule holds. Also suppose it has been observed that in some holds. Also suppose it has been observed that in some cases, even when the IF part of the rule is satisfied and cases, even when the IF part of the rule is satisfied and object Aobject A takes on takes on value Xvalue X, object , object BB can acquire some can acquire some different value different value ZZ..IFIF AA is is XXTHEN THEN BB is is YY { {cfcf 0.7}; 0.7};

BB is is ZZ { {cfcf 0.2} 0.2}

Page 51: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 51

The certainty factor assigned by a rule is The certainty factor assigned by a rule is propagated propagated through the reasoning chain. This involves through the reasoning chain. This involves establishing the net certainty of the rule consequent establishing the net certainty of the rule consequent when the evidence in the rule antecedent is uncertain:when the evidence in the rule antecedent is uncertain:

cf cf ((HH,,EE) = ) = cf cf ((EE) ) cfcfFor example,For example,IFIF sky is clear sky is clearTHEN the forecast is sunny {THEN the forecast is sunny {cfcf 0.8} 0.8}

and the current certainty factor of and the current certainty factor of sky is clearsky is clear is 0.5 is 0.5, , thenthen

cf cf ((HH,,EE) = 0.5 ) = 0.5 0.8 = 0.4 0.8 = 0.4

This result can be interpreted as This result can be interpreted as “It may be sunny”“It may be sunny”..

Page 52: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 52

For conjunctive rules such asFor conjunctive rules such as

the certainty of hypothesis the certainty of hypothesis HH, is established as follows:, is established as follows:

cf cf ((HH,,EE11EE22......EEnn) = ) = minmin [ [cf cf ((EE11), ), cf cf ((EE22),...,),..., cf cf ((EEnn)] )] cfcf

For example,For example,IFIF sky is clear sky is clearAND the forecast is sunnyAND the forecast is sunnyTHEN the action is ‘wear sunglasses’ {THEN the action is ‘wear sunglasses’ {cfcf 0.8} 0.8}

and the certainty of and the certainty of sky is clearsky is clear is 0.9 is 0.9 and the certainty of the and the certainty of the forecast of sunnyforecast of sunny is 0.7 is 0.7, then, then

cf cf ((HH,,EE11EE22) = ) = minmin [0.9, 0.7] [0.9, 0.7] 0.8 = 0.7 0.8 = 0.7 0.8 = 0.56 0.8 = 0.56

Page 53: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 53

For disjunctive rules such asFor disjunctive rules such as

the certainty of hypothesis the certainty of hypothesis HH, is established as follows:, is established as follows:

cf cf ((HH,,EE11EE22......EEnn) = ) = maxmax [ [cf cf ((EE11), ), cf cf ((EE22),...,),..., cf cf ((EEnn)] )] cfcf

For example,For example,IFIF sky is overcast sky is overcastOROR the forecast is rain the forecast is rainTHEN the action is ‘take an umbrella’ {THEN the action is ‘take an umbrella’ {cfcf 0.9} 0.9}

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

cf cf ((HH,,EE11EE22) = ) = maxmax [0.6, 0.8] [0.6, 0.8] 0.9 = 0.8 0.9 = 0.8 0.9 = 0.72 0.9 = 0.72

Page 54: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 54

When the same consequent is obtained as a result of When the same consequent is obtained as a result of the execution of two or more rules, the individual the execution of two or more rules, the individual certainty factors of these rules must be merged to certainty factors of these rules must be merged to give a combined certainty factor for a hypothesis.give a combined certainty factor for a hypothesis.

Suppose the knowledge base consists of the following Suppose the knowledge base consists of the following rules:rules:Rule Rule 1:1: IFIF AA is is XX

THEN THEN CC is is ZZ { {cfcf 0.8} 0.8}

Rule Rule 2:2: IFIF BB is is YYTHEN THEN CC is is ZZ { {cfcf 0.6} 0.6}

What certainty should be assigned to object What certainty should be assigned to object CC having value having value ZZ if both if both RuleRule 1 and 1 and RuleRule 2 are fired? 2 are fired?

Page 55: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 55

CCommon sense suggests that, if we have two pieces ommon sense suggests that, if we have two pieces of evidence (of evidence (AA is is XX and and BB is is YY) from different ) from different sources (sources (RuleRule 1 and 1 and RuleRule 2) supporting the same 2) supporting the same hypothesis (hypothesis (CC is is ZZ), then the confidence in this ), then the confidence in this hypothesis should increase and become stronger hypothesis should increase and become stronger than if only one piece of evidence had been than if only one piece of evidence had been obtained.obtained.

Page 56: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 56

To calculate a combined certainty factor we can To calculate a combined certainty factor we can use the following equation:use the following equation:

where:where:cfcf11 is the confidence in hypothesis is the confidence in hypothesis HH established by established by RuleRule 1; 1;

cfcf22 is the confidence in hypothesis is the confidence in hypothesis HH established by established by RuleRule 2; 2;

cfcf11 and and cfcf22 are absolute magnitudes of are absolute magnitudes of cfcf11 and and cfcf22, ,

respectively.respectively.

if cf1 0 and cf2 0

cf1 cf2 (1 cf1)

cf (cf1, cf2) =1 min cf1

, cf1

cf1 cf2

cf1 cf2 (1 cf1)

if cf1 0 or cf2 0

if cf1 0 and cf2 0

Page 57: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 57

The certainty factors theory provides a The certainty factors theory provides a practicalpractical alternative to Bayesian reasoning. The heuristic alternative to Bayesian reasoning. The heuristic manner of combining certainty factors is different manner of combining certainty factors is different from the manner in which they would be combined from the manner in which they would be combined if they were probabilities. The certainty theory is if they were probabilities. The certainty theory is not “mathematically pure” but does mimic the not “mathematically pure” but does mimic the thinking process of a human expert.thinking process of a human expert.

Page 58: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 58

Comparison of Bayesian reasoning Comparison of Bayesian reasoning and certainty factorsand certainty factors

Probability theory is the oldest and best-established Probability theory is the oldest and best-established technique to deal with inexact knowledge and technique to deal with inexact knowledge and random data. It works well in such areas as random data. It works well in such areas as forecasting and planning, where statistical data is forecasting and planning, where statistical data is usually available and accurate probability usually available and accurate probability statements can be made. statements can be made.

Page 59: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 59

However, in many areas of possible applications of However, in many areas of possible applications of expert systems, expert systems, reliablereliable statistical informationstatistical information is is not available or we cannot assume the conditional not available or we cannot assume the conditional independence of evidence. As a result, many independence of evidence. As a result, many researchers have found the Bayesian method researchers have found the Bayesian method unsuitable for their work. This dissatisfaction unsuitable for their work. This dissatisfaction motivated the development of the certainty factors motivated the development of the certainty factors theory.theory.

Although the certainty factors approach lacks the Although the certainty factors approach lacks the mathematical correctness of the probability theory, mathematical correctness of the probability theory, it appears to outperform it appears to outperform subjective Bayesian subjective Bayesian reasoningreasoning in such areas as diagnostics, particularly in such areas as diagnostics, particularly in medicine. in medicine.

Page 60: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 60

Certainty factors are used in cases where the Certainty factors are used in cases where the probabilities are not known or are too difficult or probabilities are not known or are too difficult or expensive to obtain. The evidential reasoning expensive to obtain. The evidential reasoning mechanism can manage incrementally acquired mechanism can manage incrementally acquired evidence, the conjunction and disjunction of evidence, the conjunction and disjunction of hypotheses, as well as evidences with different hypotheses, as well as evidences with different degrees of belief. degrees of belief.

The certainty factors approach also provides better The certainty factors approach also provides better explanations of the control flow through a rule-explanations of the control flow through a rule-based expert system.based expert system.

Page 61: Slides are based on Negnevitsky, Pearson Education, 2005 1 Lecture 3 Uncertainty management in rule- based expert systems n Introduction, or what is uncertainty?

Slides are based on Negnevitsky, Pearson Education, 2005Slides are based on Negnevitsky, Pearson Education, 2005 61

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

In the absence of any of the specified conditions, In the absence of any of the specified conditions, the Bayesian approach might be too arbitrary and the Bayesian approach might be too arbitrary and even biased to produce meaningful results. even biased to produce meaningful results.

The Bayesian belief propagation is of The Bayesian belief propagation is of exponential exponential complexitycomplexity, and thus is impractical for large , and thus is impractical for large knowledge bases.knowledge bases.