Certainty Factor
Certainty Factor
Pendahuluan:
Masalah metode Bayesian
PROSPECTOR:
hipotesa geologis tentang mineral sedikit
92 elemen alam
MYCIN:
hipotesa medis jauh lebih banyak
banyaknya mikro-organisme
Pendahuluan:
Masalah metode Bayesian
Pendahuluan:
Masalah metode Bayesian
MYCIN:
Faktor kepercayaan dan tidak percaya.
Kontradiksi 1:
P(H) + P(H) = 1
P(H) = 1 P(H)
Kontradiksi 2:
P(H|E) = 1 P(H|E)
Pendahuluan:
Masalah metode Bayesian
contoh:
IF
1) The stain of the organism is gram positive, and
2) The morphology of the organism is coccus, and
3) The growth conformation of the organism is chains
THEN
There is suggestive evidence (0.7) that the identity of
the organism is streptococcus
Posterior probability:
P(H | E1 E2 E3) = 0.7
P(H | E1 E2 E3) = 1 - 0.7 = 0.3
by Aina Musdholifah, UGM, 2014
H dan E terkait
H dan E belum tentu berkaitan
while
while
MD(H , E) = 0
MB(H , E) = 0
MB dan MD
MB (H , E) =
1
max[ P( H | E ), P ( H )] P( H )
jika P(H) = 1
yang lainnya
max[1,0] P( H )
MD (H , E) =
1
min[ P( H | E ), P( H )] P( H )
min[1,0] P( H )
jika P(H) = 0
yang lainnya
Nilai CF
CF (H,E) + CF(H,E) = 0
atau
CF (H,E) + CF(H,E) 1
Contoh:
Artinya:
Mahasiswa tersebut 70% yakin bahwa dia akan lulus jika dia
mendapatkan A di mata kuliah terakhir
Mahasiswa tersebut -70% yakin bahwa dia tidak akan lulus jika dia
mendapatkan A di mata kuliah terakhir
Nilai
Ranges
0 MB 1
0 MD 1
1 CF 1
MB = 1
MD = 0
CF = 1
MB = 0
MD = 1
CF = -1
Ketiadaan Evidence
P(H|E) = P(H)
MB = 0
MD = 0
CF = 0
by Aina Musdholifah, UGM, 2014
CF menurut MYCIN 77
MB MD
CF =
1 min( MB, MD)
Contoh:
MB = 0,999 dan
MD = 0,799
0.999 0.799
Maka CF =
0.200
=
= 0.995
1 min(0.999,0.799) 1 0.799
Certainty Factor
Term
Certainty Factor
Definitely not
-1.0
-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
by Aina Musdholifah, UGM, 2014
sakit demam)
is flu)
sakit demam And pasien flu)
sakit demam Or pasien flu)
=
=
=
=
0.9
0.6
0.6
0.9
CF1(Q)
CF2(Q)
Contoh1
CF(pasien demam)
=1
CF(pasien batuk)
= 0.8
CF(If pasien is batuk Then pasien flu)
= 0.5
CF(If pasien demam Then pasien flu)
= 0.6
CF1(pasien flu)
= 0.4
CF2(pasien flu)
= 0.6
CF(pasien flu)
= 0.4 + 0.6 - 0.24 = 0.76
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0.2
0.4
0.6
0.8
Contoh2
CF untuk aturan penyakit streptococcus
IF
1) The stain of the organism is gram positive, and
2) The morphology of the organism is coccus, and
3) The growth conformation of the organism is
chains
THEN
There is suggestive evidence (0.7) that the identity
of the organism is streptococcus
Contoh2 (penjelasan)
Attenuation factor menyatakan derajat
certainty atas hipotesa dengan diketahui
evidence tertentu
Attenuation factor (pada contoh2)
diperoleh dari asumsi bahwa semua evidenve
- E1, E2 and E3- diketahui
CF(E1,e) = CF(E2,e) = CF(E3,e) = 1
dimana e adalah observed evidence
by Aina Musdholifah, UGM, 2014
Contoh2 (lanj.)
Misalkan:
CF(E1,e) = 0.5; CF(E2,e) = 0.6; CF(E3,e) = 0.3
Maka:
CF(E,e) = CF (E1 E2 E3)
= min[CF(E1,e), CF(E2,e), CF(E3,e)]
= min[0.5, 0.6, 0.3]
= 0.3
Sehingga:
CF(H,e) = CF (E,e) CF(H,E)
= 0.3 x 0.7
= 0.21
by Aina Musdholifah, UGM, 2014
Contoh2 (lanj.)
Contoh2 (lanj.)
Misalkan: terdapat rule lain (rule 2) yang juga dapat
memberikan hipotesa streptocccus dengan CF2=0.5
Maka
CFCOMBINE(CF1,CF2)
CFCOMBINE(CF1,CF2)
CFCOMBINE(CF1,CF2)
CFCOMBINE(CF1,CF2)
CFCOMBINE(CF1,CF2)
=
=
=
=
=
CFCOMBINE(0.21,0.5)
CF1 + CF2 (1 - CF1)
0.21 + 0.5 (1 0.21)
0.21 + 0.5 (0.79)
0.605
Contoh2 (lanj.)
Contoh2 (lanj.)
Mycin
Goal: Aid physicians in the diagnosis and
treatment of infectious diseases
(1) identify infectious organisms
(2) select drugs that control these organisms
User Interface:
Dialog with physician for data
gathering
(1) general patient data
(2) laboratory results
(3) patient symptoms
EMYCIN
Mycin Representation
Facts: (parameter context value CF)
(identity organism_1 klebsiella .25)
(sensitive organism_1 penicillin -1.0)
Rules:
Mycin Inference
Context: Objects discussed by MYCIN
(1) different types, i.e. patient, drug, culture
(2) organised in a tree
Mycin Example
John's foot is hurting (1.0). When I examine it,
it looks swollen (0.6) and a little bit red (0.1). I
do not have a thermometer available but I think
he has some fever (0.4). I know that John is a
marathon runner who constantly overloads his
joints (1.0). John can still move his foot (1.0).
? Is John's foot
infected?
1.
2.
3.
4.
5.
IF
IF
IF
IF
IF
broken, sprained, or
0.6
0.8
0.5
0.8
1.0