Top Banner
CERTAINTY FACTORS Lecture #6 Expert System Lab Work
28

CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

Mar 13, 2019

Download

Documents

voque
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: CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

CERTAINTY FACTORS

Lecture #6

Expert System Lab Work

Page 2: CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

Uncertanity

There is a uncertainty in the mind

Of experts when make a decision

accordance their expertise

Page 3: CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

Representation Uncertainty

Basis Concept of ProbabilityCertainty FactorBayesian ReasoningFuzzyNeural NetworkGenetic Algorithm

Page 4: CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

Causes of Uncertainty

Not completely and uncertainty information

Unknown data

Unify the different of view point of experts

Imprecise language (always,often,seldom,some times)

Page 5: CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

5

Causes Uncertainty

Imprecise

language

Term

Always Very often Usually Often Generally Frequently Rather often About as often as not Now and then Sometimes Occasionally Once in a while Not often Usually not Seldom Hardly ever Very seldom Rarely Almost never Never

Mean value

99 88 85 78 78 73 65 50 20 20 20 15 13 10 10

7 6 5 3 0

Term

Always Very often Usually Often

Generally Frequently Rather often

About as often as not Now and then Sometimes Occasionally Once in a while Not often Usually not Seldom Hardly ever Very seldom Rarely Almost never Never

Mean value

100 87 79 74 74 72 72 50 34 29 28 22 16 16 9 8 7 5 2 0

Milton Hakel (1968) Ray Simpson (1944)

Page 6: CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

Certainty Theory

Certainty factor (cf ), value to measure degree of belief from expert.

Maximum value of cf is +1.0 (definitely true) and minimum -1.0 (definitely false).

Two aspects: Certainty in the EvidenceThe evidence can have a certainty factor attached

Certainty in Rule

Page 7: CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

1. Model ‘Net Belief’ (Shortliffe dan Buchanan)

CF (Rule)=MB(H,E)-MD(H,E)

MB(H,E) =

M D(H,E) =

Computation of Certainty Factors

1 ; if P(H)=1

max[P(H|E),P(H)]-P(H)/1-P(H) ; Otherwise

1 ; if P(H)=0

min[P(H|E),P(H)]-P(H)/1-P(H) ; Otherwise

Page 8: CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

Certainty Factors

Uncertain Term Certainty Factor

Definitely not -1.0

Almost certainly not -0.8

Probably not -0.6

Maybe not -0.4

Unknown -0.2 to +0.2

Maybe +0.4

Probably +0.6

Almost certainly +0.8

Definitely +1.0

2. Direct Interview with Expert

Page 9: CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

Example :

Expert :”If headache and have a cold and fever, then most possibility is influenza”

Rule : IF evidence 1= headache AND evidence 2= have a cold AND evidence 3= fever

THEN seek=influenza

(cf = 0.8)

Page 10: CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

Expert System With CF

In Expert System with CF, knowledge base composed of set of rules with syntax:

IF <evidence>THEN <hypothesis> {cf }

CF refers to degree of belief for hypothesis H when evidence E occured.

Page 11: CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

Degree of belief for hypothesis H when evidence E occured.cf (H,E) = cf (E) * cf(Rule)

e.g:IF sky is clearTHEN the forecast is sunny {cf 0.8}

With cf of “sky is clear” is 0.5cf (H,E) = 0.5 * 0.8 = 0.4

Example

Page 12: CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

Multiple Antecedents

How the CF if we have two evidence?

With conjunction (i.e. and) Use minimum cf of evidence

With disjunction(i.e. or) Use maximum cf of evidence

Page 13: CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

Conjunctive Antecedents - Example

Conjunctive Rules: cf(H, E1 and E2 and …Ei) = min{cf(E1 , E2 , …Ei )}

*cf(Rule)

IF there are dark clouds E1

AND the wind is stronger E2

THEN it will rain {cf 0.8}

If cf(E1) = 0.5 and cf(E2) = 0.9, then

cf(H, E) = min{0.5, 0.9} * 0.8 = 0.4

Page 14: CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

Disjunctive Antecedents - Example

Disjunctive Rules:cf(H, E1 or E2 or …Ei) = max{cf(E1 , E2 , …Ei )}

*cf(Rule)

IF there are dark clouds E1

OR the wind is stronger E2

THEN it will rain {cf 0.8}

If cf(E1) = 0.5 and cf(E2) = 0.9, then

cf(H, E) = max{0.5, 0.9} * 0.8 = 0.72

Page 15: CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

How to determine CF if two rules have similar conclusion?

Similarly Concluded Rules

Rule 1:

IF weatherperson predicts IF weatherperson predicts rain (Erain (E11) THEN it will rain) THEN it will rain

{{cfcf 11 0.7} 0.7}

Rule 2:

IF farmer predicts rain IF farmer predicts rain (E(E22) THEN it will rain) THEN it will rain

{{cfcf 22 0.9} 0.9}

Page 16: CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

Similarly Concluded Rules - Example

Two rules with similar conclusion:

IF weatherperson predicts IF weatherperson predicts rain Erain E11

THEN it will rainTHEN it will rain

{{cfcf 11 0.7} 0.7}

IF farmer predicts rain IF farmer predicts rain E E22

THEN it will rainTHEN it will rain

{{cfcf 22 0.9} 0.9}

Suppose cf(ESuppose cf(E11) = 1.0 and cf(E) = 1.0 and cf(E2 2 ) = 1.0) = 1.0

cfcf 1(H1, E1) = cfcf(E1) * cfcf(Rule1)

cfcf 1(H1, E1) = 1.0 * 0.7 = 0.7

cfcf 2 (H2, E2) = cfcf(E2) * cfcf(Rule2)

cfcf 2(H2, E2) = 1.0 * 0.9 = 0.9

Page 17: CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

Similarly Concluded Rules

Formula :

Page 18: CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

Similarly Concluded Rules

New CF value from facts above above can be formulated:

cf (cf1,cf2) = cf1+cf2*(1-cf1)

= 0.7+0.9(1-0.7)

= 0.97

Page 19: CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

EXERCISE

Determine New Value of CF from some facts in below :1. IF fever

THEN typhus {cf -0.39}

2. IF amount of thrombosis is low

THEN typhus {cf -0.51}

3. IF the body is weak

THEN typhus {cf 0.87}

4. IF diarhea/constipation

THEN typhus {cf 0.63}

Page 20: CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

Combining CF with CLIPS

Page 21: CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

Combining CF with CLIPS

Page 22: CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

Combining CF with CLIPS

Page 23: CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

Combining CF with CLIPS

Page 24: CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

Combining CF with CLIPS

Page 25: CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

Lakukan Beberapa Langkah

- Load -> Reset -> (agenda)- Perhatikan urutan rule yang dijalankan

Rule dengan Salience yang lebih besar akan dieksekusi terlebih dahulu

Rule dengan Salience yang lebih besar akan dieksekusi terlebih dahulu

Page 26: CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

Modifikasi Salience dari Rule

(defrule both-positif(declare (salience 6) .... .... ....

(defrule both-negatif(declare (salience 10) .... .... ....

Page 27: CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

Lakukan langkah yang sama : Load -> Reset -> Agenda

Lihat pada Agenda:

Akan terlihat bahwa rule dengan salience tinggi, akan dijalankan terlebih dahulu

Page 28: CERTAINTY FACTORS - totoharyanto.staff.ipb.ac.idtotoharyanto.staff.ipb.ac.id/files/2011/07/Praktikum_6.pdf · Certainty Theory Certainty factor (cf ), value to measure degree of belief

Combining CF with CLIPS

Cf = 0.8390766