46
06/18/22 Intelligent Systems and Soft Computing 1 Introduction, or what is Introduction, or what is uncertainty? uncertainty? Basic probability theory Basic probability theory Bayesian reasoning Bayesian reasoning Bias of the Bayesian method Bias of the Bayesian method Certainty factors theory and Certainty factors theory and evidential evidential reasoning reasoning Summary Summary Lecture 3 Lecture 3 Uncertainty management in Uncertainty management in rule- rule- based expert systems based expert systems

Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

Embed Size (px)

DESCRIPTION

Lecture 3. Uncertainty management in rule- based expert systems. Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning Bias of the Bayesian method Certainty factors theory and evidential reasoning Summary. Introduction, or what is uncertainty?. - PowerPoint PPT Presentation

Citation preview

Page 1: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 1

Introduction, or what is uncertainty?Introduction, or what is uncertainty?

Basic probability theoryBasic probability theory

Bayesian reasoningBayesian reasoning

Bias of the Bayesian methodBias of the Bayesian method

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

SummarySummary

Lecture 3Lecture 3Uncertainty management in rule-Uncertainty management in rule-based expert systemsbased expert systems

Page 2: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 2

Information can be incomplete, inconsistent,Information can be incomplete, inconsistent,uncertain, or all three. In other words, informationuncertain, or all three. In other words, informationis often unsuitable for solving a problem.is often unsuitable for solving a problem.

Uncertainty Uncertainty is defined as the lack of the exactis defined as the lack of the exactknowledge that would enable us to reach a perfectlyknowledge that would enable us to reach a perfectly

reliable conclusion. Classical logic permits onlyreliable conclusion. Classical logic permits only exact reasoning. It assumes that perfect knowledgeexact 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:

IF IF A A is true is true IF IF A A is falseis false

THEN THEN A A is not false is not false THEN THEN A A is not trueis not true

Introduction, or what is uncertainty?Introduction, or what is uncertainty?

Page 3: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 3

Weak implicationsWeak implications. . Domain experts and Domain experts and knowledge engineers have the painful task knowledge engineers have the painful task of establishing concrete correlations between IFof establishing concrete correlations 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 Therefore, expert systems need to have the ability to handle vague associations, for example by to handle vague associations, for example by accepting the degree of correlations as numerical accepting the degree of correlations as numerical certainty factors.certainty factors.

Sources of uncertain knowledgeSources of uncertain knowledge

Page 4: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 4

Imprecise language.Imprecise language. Our natural language is Our natural language is ambiguous and imprecise. We describe facts ambiguous and imprecise. We describe facts with such terms as with such terms as often often and and sometimessometimes, , frequently frequently 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. However, if the meaning of production rules. However, if the meaning of the facts is quantified, it can be the facts is quantified, it can be used in expert systems. In 1944, Ray used in expert systems. In 1944, Ray Simpson asked 355 high school and Simpson asked 355 high school and college students to place 20 terms like college students to place 20 terms like often often on a on a scale between 1 and 100. In 1968, Milton scale between 1 and 100. In 1968, Milton Hakel repeated this experiment.Hakel repeated this experiment.

Page 5: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 5

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

998885787873655020202015131010

76530

Term

AlwaysVery oftenUsuallyOften

GenerallyFrequentlyRather often

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

Mean value

10087797474727250342928221616

987520

Milton Hakel (1968)Ray Simpson (1944)

Page 6: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 6

Unknown dataUnknown data. . When the data is incomplete or When the data is incomplete or missing, the only solution is to accept the missing, the only solution is to accept the value “unknown” and proceed to an value “unknown” and proceed to an approximate approximate reasoning with this reasoning with this value.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. Unfortunately, expertise of a number of experts. Unfortunately, experts often have contradictory opinions and experts often have contradictory opinions and produce conflicting rules. To resolve the conflict, produce conflicting rules. To resolve the conflict, the knowledge engineer has to attach a weight to the knowledge engineer has to attach a weight to each expert and then calculate the composite each expert and then calculate the composite conclusion. But no systematic method exists to conclusion. But no systematic method exists to obtain these weights.obtain these weights.

Page 7: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 7

The concept of probability has a long history thatThe concept of probability has a long history that goes back thousands of years when words likegoes 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 probabilityHowever, 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 cancases in which the event occurs. Probability can also be defined as a also be defined as a scientific measure of chancescientific measure of chance. .

Basic probability theoryBasic probability theory

Page 8: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 8

Probability can be expressed mathematically as a Probability can be expressed mathematically as a numerical index with a range between numerical index with a range between zero (an absolute impossibility) to zero (an absolute impossibility) to unity (an absoluteunity (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 least at least two possible outcomes: favourable two possible outcomes: favourable outcome or success, and unfavourable outcome outcome or success, and unfavourable outcome or failure.or failure.

the number of possible outcomes

the number of successessuccess)P(

the number of possible outcomesfailure)P(

the number of failures

Page 9: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 9

If If s s is the number of times success can occur, and is the number of times success can occur, and f f is the number of times failure can occur, thenis the number of times failure can occur, then

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, s s = = f f =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.

aandnd

fss

psuccessP

fsf

qfailureP

p q 1

Page 10: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 10

Let Let A A be an event in the world and be an event in the world and B B be another event. be another event. Suppose that events Suppose that events A A and and B B are not mutually are not mutually exclusive, but occur conditionally on the exclusive, but occur conditionally on the occurrence of the other. The probability that event occurrence of the other. The probability that event A A will occur if event will occur if event B B occurs is called theoccurs is called the conditional probability. conditional probability. Conditional Conditional probability is denoted mathematically as probability is denoted mathematically as pp((AABB) ) in in which the vertical bar represents which the vertical bar represents GIVENGIVEN and the and the complete probability expression is interpreted as 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

occurcanBtimesofnumbertheoccurcanBandAtimesofnumberthe

BAp

Page 11: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 11

The number of times The number of times A A and and B B can occur, or the can occur, or the probability that both probability that both A A and and B B will occur, is called will occur, is called the the joint probability joint 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 B B can occur is the probability of can occur is the probability of BB, , pp((BB), and thus), and thus

Similarly, the conditional probability of event Similarly, the conditional probability of event B B occurring given that event occurring given that event A A has occurred equalshas occurred equals

BpBAp

BAp

ApABp

ABp

Page 12: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 12

Hence,Hence,

oror

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

yields the yields the Bayesian ruleBayesian rule::

ApABpABp

ApABpBAp

BpBAp

BAp

Page 13: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 13

where: where: pp((AABB) is the conditional probability that event ) is the conditional probability that event A A occurs given that event occurs given that event B B has occurred;has occurred; pp((BBAA) is the conditional probability of event ) is the conditional probability of event BB occurring given that event occurring given that event A A has occurred; has occurred; pp((AA) is the probability of event ) is the probability of event A A occurring; occurring; pp((BB) is the probability of event ) is the probability of event B B occurring.occurring.

BayesianBayesian rulerule

Bp

ApABpBAp

Page 14: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 14

The joint probability

i

n

ii

n

ii BpBApBAp

11

AB4

B3

B1

B2

Page 15: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 15

If the occurrence of event If the occurrence of event A A depends on only two depends on only two mutually exclusive events, mutually exclusive events, B B and NOT and NOT BB , we obtain:, we obtain:

wherewhere 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:

p(A)=p(AB) p(B)+p(AB) p(B)

p(B) =p(BA) p(A) +p(BA) p(A)

ApABpApABp

ApABpBAp

Page 16: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 16

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

This rule implies that if event This rule implies that if event E E occurs, then theoccurs, then the probability that event probability that event H H will occur is will occur is pp..

In expert systems, In expert systems, H H usually represents a hypothesisusually represents a hypothesis and and E E denotes evidence to support this hypothesis.denotes evidence to support this hypothesis.

Bayesian reasoningBayesian reasoning

IF IF E E is true is true THEN THEN H H is true {with probability is true {with probability pp}}

Page 17: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 17

The Bayesian rule expressed in terms of hypotheses The Bayesian rule expressed in terms of hypotheses and evidence looks like this:and evidence looks like this:

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

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

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

when hypothesis when hypothesis H H is false.is false.

HpHEpHpHEp

HpHEpEHp

Page 18: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 18

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 thedetermines the prior probabilities prior 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 E E if hypothesis if hypothesis H H is true, is true, pp((EEHH), and if hypothesis ), and if hypothesis H H 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 ) for hypothesis hypothesis HH in light of the user-supplied evidence in light of the user-supplied evidence EE. Probability . Probability pp((HHEE) is called the ) is called the posterior posterior probabilityprobability of hypothesis of hypothesis HH upon observing upon observing evidence evidence EE..

Page 19: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 19

We can take into account both multiple hypotheses We 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 E E and multiple hypotheses follow: and multiple hypotheses follow:

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

m

kkk

iii

HpHEp

HpHEpEHp

1

m

kkkn

iinni

HpHE...EEp

HpHE...EEpE...EEHp

121

2121

Page 20: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 20

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

Therefore, in expert systems, conditional Therefore, in expert systems, conditional independence among different evidences assumed. independence 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...EEHp

121

2121

...

Page 21: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 21

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

Suppose an expert, given three conditionallySuppose 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.

Ranking potentially true hypothesesRanking potentially true hypotheses

Page 22: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 22

The prior and conditional probabilitiesThe prior and conditional probabilities

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

H ypothesi sProbability

1i 2i 3i

0.40

0.9

0.6

0.3

0.35

0.0

0.7

0.8

0.25

0.7

0.9

0.5

iHp

iHEp 1

iHEp 2

iHEp 3

Page 23: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 23

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

decreases and becomes equal to belief in hypothesis decreases and becomes equal to belief in hypothesis HH22. Belief in hypothesis . Belief in hypothesis HH33 increases and even nearly increases and even nearly

reaches beliefs in hypotheses reaches beliefs in hypotheses HH1 1 and and HH22..

Thus,Thus,

32,1,=,3

13

33 i

HpHEp

HpHEpEHp

kkk

iii

0.3425.0.90+35.07.0+0.400.6

0.400.631

EHp

0.3425.0.90+35.07.0+0.400.6

35.07.032

EHp

0.3225.0.90+35.07.0+0.400.6

25.09.033

EHp

Page 24: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 24

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

posterior probabilities are calculated asposterior probabilities are calculated as

Hence,Hence,

32,1,=,3

131

3131 i

HpHEpHEp

HpHEpHEpEEHp

kkkk

iiii

0.1925.00.5+35.07.00.8+0.400.60.3

0.400.60.3311

EEHp

0.5225.00.5+35.07.00.8+0.400.60.3

35.07.00.8312

EEHp

0.2925.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 25: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 25

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 considerationremain under consideration after after

all evidences (all evidences (EE11, , EE2 2 and and EE33) were observed.) were observed.

32,1,=,3

1321

321321 i

HpHEpHEpHEp

HpHEpHEpHEpEEEHp

kkkkk

iiiii

0.4525.09.00.50.7

0.7

0.7

0.5

+.3507.00.00.8+0.400.60.90.30.400.60.90.3

3211

EEEHp

025.09.0+.3507.00.00.8+0.400.60.90.3

35.07.00.00.83212

EEEHp

0.5525.09.00.5+.3507.00.00.8+0.400.60.90.3

25.09.00.70.53213

EEEHp

Page 26: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 26

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

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

Bias of the Bayesian methodBias of the Bayesian method

Page 27: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 27

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

IF IF the symptom is “odd noises” the symptom is “odd noises” THEN the starter is THEN the starter is bad {with probability 0.7}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 makes odd noises when you press the starter. The conditional press the starter. The conditional probability of the starter being faulty if probability of the starter being faulty if the car makes odd noises may be the car makes odd noises may be expressed as:expressed as:

PP(starter is not bad(starter is not badodd noises) = odd noises) = = = pp(starter is (starter is goodgoododd noises) = 1odd noises) = 10.7 = 0.30.7 = 0.3

Page 28: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 28

Therefore, we can obtain a companion rule that statesTherefore, we can obtain a companion rule that states IF IF 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 conditionalDomain experts do not deal with conditional probabilities and often deny the very existence of theprobabilities and often deny the very existence of the hidden implicit probability hidden 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:

IF IF the starter is badthe starter is bad THEN the symptom is “odd noises” {probability 0.85} THEN the symptom is “odd noises” {probability 0.85}

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

Page 29: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 29

To use the Bayesian rule, we still need theTo 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 the car does not start. Suppose, the expert supplies us the value of 5 per cent. Now we can apply the us the value of 5 per cent. Now we can apply the Bayesian rule to obtain:Bayesian rule to obtain:

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.

0.230.950.15+0.050.85

0.050.85

noisesoddbadisstarterp

Page 30: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 30

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

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

Certainty factors theory and Certainty factors theory and evidential reasoningevidential reasoning

Page 31: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 31

Uncertain terms and their Uncertain terms and their interpretation in MYCIN interpretation 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 32: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 32

In expert systems with certainty factors, theIn 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:

IF IF evidenceevidence THEN THEN hypothesishypothesis{{cf cf }}

where where cf cf represents belief in hypothesis represents belief in hypothesis H H given given that evidence that evidence E E has occurred.has occurred.

Page 33: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 33

The certainty factors theory is based on two functions: measure The certainty factors theory is based on two functions: measure of belief of belief MBMB((HH,,EE) – the measure of increased belief in H due to ) – the measure of increased belief in H due to E, and measure of disbelief E, and measure of disbelief MDMD((HH,,EE)- the measure of increased )- the measure of increased disbelief in H due to E.disbelief in H due to E.

pp((HH) is the prior probability of hypothesis ) is the prior probability of hypothesis H H being true; being true; pp((HHEE) ) is the probability that hypothesis is the probability that hypothesis H H is true givenis true given evidence evidence 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

Page 34: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 34

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

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

EH,MD,EH,MBmin-EH,MDEH,MB

=cf1

Page 35: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 35

Example: Example:

Consider a simple rule: Consider a simple rule:

IF IF A A is is X X

THEN THEN BB is is Y Y

An 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 holds. Also suppose it has been observed that

in some cases, even when the IF part of the in some cases, even when the IF part of the

rule is satisfied andrule is satisfied and object A object A takes on takes on value Xvalue X, object , object B B

can acquire somecan acquire some different value different value ZZ..IF IF A A is is X X THEN THEN B B is is Y Y {{cf cf 0.7};0.7}; B B is is Z Z {{cf cf 0.2}0.2}

Page 36: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 36

The certainty factor assigned by a rule is propagatedThe certainty factor assigned by a rule is propagated through the reasoning chain. This involvesthrough the reasoning chain. This involves establishing the net certainty of the rule consequentestablishing 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 ((E,eE,e) x ) x cf (H,E) cf (H,E) For example, For example, IF IF sky is clearsky is clear THEN the forecast is THEN the forecast is sunny {sunny {cf cf 0.8} 0.8}

and the current certainty factor of and the current certainty factor of sky is clear sky is clear is 0.5is 0.5,, then then

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 37: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 37

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,,EE11 EE22……EEnn) = ) = min min [[cf cf ((EE11,e),,e), cf cf ((EE22,e),...,,e),...,cf cf

((EEnn,e)] ,e)] cf cf

For example, For example, IF IF sky is clear sky is clear AND the forecast is sunny AND the forecast is sunny THEN the action is ‘wear sunglasses’ {THEN the action is ‘wear sunglasses’ {cf cf 0.8}0.8}

and the certainty of and the certainty of sky is clear sky is clear is 0.9 is 0.9 and the certainty of theand the certainty of the forecast of sunny forecast of sunny is 0.7is 0.7, then , then cf cf ((HH,,EE11EE22) = ) = min min [0.9, 0.7] [0.9, 0.7] 0.8 = 0.7 0.8 = 0.7 0.8 = 0.560.8 = 0.56

IF evidenceE1...AND evidenceEnTHEN hypothesisH {cf}

Page 38: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 38

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) = ) = max max [[cf cf ((EE11), ), cf cf ((EE22),...,),...,cf cf ((EEnn)] )] cfcf

For example, For example, IF IF sky is overcast sky is overcast OR OR the forecast is rain the forecast is rain THEN the action is ‘take an THEN the action is ‘take an umbrella’ {umbrella’ {cf cf 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 the and the certainty of the forecast of rainforecast of rain is 0.8is 0.8, then , then cf cf ((HH,,EE11EE22 ) = ) = max max [0.6, 0.8] [0.6, 0.8] 0.9 = 0.8 0.9 = 0.8 0.9 = 0.720.9 = 0.72

IF evidenceE1...OR evidenceEnTHEN hypothesisH {cf}

Page 39: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 39

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 followingSuppose the knowledge base consists of the following rules: rules: Rule Rule 1: 1: IF IF A A is is X X THEN THEN C C is is Z Z {{cf cf 0.8} 0.8}

RuleRule 2: 2: IF IF B B is is YY THEN THEN C C is is Z Z {{cf cf 0.6}0.6}

What certainty should be assigned to object What certainty should be assigned to object C C having value having value Z Z if both if both RuleRule 1 and 1 and Rule Rule 2 are 2 are fired?fired?

Page 40: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 40

Common sense suggests that, if we have twoCommon sense suggests that, if we have two pieces of evidence (pieces of evidence (A A is is X X and and B B is is YY) from) from different sources (different sources (Rule Rule 1 and 1 and Rule Rule 2) supporting2) supporting the same hypothesis (the same hypothesis (C C is is ZZ), then the confidence), then the confidence in this hypothesis should increase and becomein this hypothesis should increase and become stronger than if only one piece of evidence had stronger than if only one piece of evidence had been obtained. been obtained.

Page 41: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 41

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 H H established by established by Rule Rule 1; 1;

cfcf2 2 is is

the confidence in hypothesis the confidence in hypothesis H H established by established by Rule Rule 2; 2; cfcf11and and cfcf22are absolute magnitudes of are absolute magnitudes of cfcf11 and and cfcf22, ,

respectively.respectively.

if cf 0 andcf 0

cf1 cf2 (1 cf1)

cf(cf1, cf2) =1 min cf1, cf2

cf1 cf2

cf1 cf2 (1 cf1)

if cf 0 orcf 0

if cf 0 andcf 0

Page 42: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 42

The certainty factors theory provides a The certainty factors theory provides a practical practical 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 43: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 43

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 forecasting and planning, where statistical data is statistical data is usually availableusually available and and accurate probability statements accurate probability statements can be madecan be made..

Page 44: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 44

However, in many areas of possible applications of However, in many areas of possible applications of expert systems, expert systems, reliable statistical information is not reliable statistical information is not available or we cannot assume the conditional available or we cannot assume the conditional independence of evidenceindependence of evidence. As a result, many . 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 Although the certainty factors approach lacks the lacks the mathematical correctness of the probability theory, mathematical correctness of the probability theory, it outperforms subjective Bayesian reasoning in it outperforms subjective Bayesian reasoning in such areas as diagnostics.such areas as diagnostics.

Page 45: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 45

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 obtainexpensive to obtain. The . The evidential reasoningevidential 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 The certainty factors approach also provides better better explanations of the control flowexplanations of the control flow through a through a rule-rule-basedbased expert system. expert system.

Page 46: Introduction, or what is uncertainty? Basic probability theory Bayesian reasoning

04/19/23 Intelligent Systems and Soft Computing 46

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 exponential The Bayesian belief propagation is of exponential complexity, and thus is impractical for large complexity, and thus is impractical for large knowledge bases.knowledge bases.