Anda di halaman 1dari 34

Centainty Factors

By Aina Musdholifah, Ph.D.,


Computer Science
Gadjah Mada University
2014

Pendahuluan:
Masalah metode Bayesian
 PROSPECTOR:
hipotesa geologis tentang mineral sedikit 
92 elemen alam

 MYCIN:
hipotesa medis jauh lebih banyak 
banyaknya mikro-organisme

by Aina Musdholifah, UGM, 2014

Pendahuluan:
Masalah metode Bayesian


by Aina Musdholifah, UGM, 2014

Pendahuluan:
Masalah metode Bayesian
 MYCIN:
Faktor kepercayaan dan tidak percaya.

 Kontradiksi 1:
P(H) + P(H) = 1
P(H) = 1 P(H)

 Kontradiksi 2:

Secara teori Bayes benar, namun


secara intuitive / kenyataan tidak

P(H|E) = 1 P(H|E)

by Aina Musdholifah, UGM, 2014

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

Pendahuluan: Belief dan Disbelief


 Contoh:
Mata kuliah terakhir yang diperlukan untuk lulus.
Misalkan (GPA) tidak terlalu bagus, sehingga perlu
nilai A untuk mata kuliah tersebut agar GPA naik.
 Pernyataan tentang belief kelulusan:
P(lulus | nilai matakuliah terakhir A) = 0.70
 Keyakinan kelulusan tidak 100% karena adanya
kemungkinan permasalahan lain yang
mempengaruhi ketidaklulusannya.
by Aina Musdholifah, UGM, 2014

Pendahuluan: Belief dan Disbelief


 Misalkan pernyataan tentang belief kelulusan
sesuai, maka menurut teori Bayes:
P( tidak lulus | nilai matakuliah terakhir A) = 0.30

 Meskipun berdasarkan rumus benar, namun secara


intuitive salah.
 P(H|E) = 1 P(HE)



H dan E terkait
H dan E belum tentu berkaitan

 Diperlukan konfirmasi atas hipotesa berdasarkan


evidence  epistemic probability atau degree of
confimation atau degree of belief
by Aina Musdholifah, UGM, 2014

What is Certainty Factor ?


 Teori Certainty berusaha untuk melakukan pendekatan
heuristik untuk penalaran (reasoning) dengan uncertainty
 Pakar manusia memberi nilai kepercayaan (confidence)
dalam kesimpulannya dan step reasoning tentang
unlikely, almost certain, highly probable,
possible. Nilai-nilai tersebut tidak bersifat probabilistik
tetapi lebih bersifat heuristik yang dihasilkan dari
pengalaman.
 Uncertainty dinyatakan sebagai derajat kepercayaan
(degree of belief)
by Aina Musdholifah, UGM, 2014

What is Certainty Factor ?


 Degree of belief  konfidensi
 IF <evidence>
THEN <hypothesis> {cf }
 MB(H , E): ukuran belief hipotesa H berkaitan dengan evidence E
MD(H , E): ukuran disbelief hipotesa H berkaitan dengan evidence E
0 < MB(H , E) < 1
0 < MD(H , E) < 1

while
while

MD(H , E) = 0
MB(H , E) = 0

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


by Aina Musdholifah, UGM, 2014

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

by Aina Musdholifah, UGM, 2014

Nilai CF
 CF (H,E) + CF(H,E) = 0

atau

CF (H,E) + CF(H,E) 1

 Contoh:



CF(lulus , nilai matakuliah terakhir A) = 0.70


CF (tidak lulus, nilai matakuliah terakhir A) = -0.7

 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

 Pertanyaan yang biasa digunakan:





Seberapa Anda yakin bahwa nilai A pada mata kuliah terakhir


membuat Anda lulus?
Seberapa Anda tidak yakin bahwa nilai A pada mata kuliah terakhir
membuat Anda lulus?
by Aina Musdholifah, UGM, 2014

Karakteristik MB, MD dan CF


Karakteristik

Nilai

Ranges

0 MB 1

Hipotesa yakin benar


P(H|E) = 1

0 MD 1
1 CF 1
MB = 1
MD = 0
CF = 1

Hipotesa yakin salah


P(H|E) = 0

MB = 0
MD = 1
CF = -1

Ketiadaan Evidence
P(H|E) = P(H)

MB = 0
MD = 0
CF = 0
by Aina Musdholifah, UGM, 2014

Aljabar Certainty Stanford


 CF(fact) [-1,1] menggambarkan konfidensi dari data yang
diberikan, data dugaan atau hipotesa
 CF yang mendekati 1 mengindikasikan konfidensi dalam
kenyataannya benar
 CF yang mendekati -1 mengindikasikan konfidensi dalam
kenyataannya tidak benar
 CF sekitar 0 mengindikasikan bahwa terdapat sedikit
evidence untuk atau terhadap keberadaan fakta,
 treshold kadang-kadang digunakan untuk menghindari
reasoning dengan informasi yang uncertain
 CF(rule) [-1,1] menggambarkan konfidensi pakar tentang
reliabilitas aturan
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

by Aina Musdholifah, UGM, 2014

Certainty Factor
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
by Aina Musdholifah, UGM, 2014

Kombinasi CF Fakta dan Aturan


CF(H|e) = CF(E|e)*CF(H|E) atau CF(H|e) = CF(H|E)
CF(A And B) = Min[CF(A),CF(B)]
CF(A Or B)
= Max[CF(A),CF(B)]
CF(pasien
CF(pasien
CF(pasien
CF(pasien

sakit demam)
is flu)
sakit demam And pasien flu)
sakit demam Or pasien flu)

=
=
=
=

0.9
0.6
0.6
0.9

CF(Q) = CF(If P Then Q) * CF (P)


CF(pasien sakit demam)
= 0.8
CF(If pasien sakit demam Then pasien terkena flu) = 0.5
CF(pasien terkena flu)
= 0.4
by Aina Musdholifah, UGM, 2014

Kombinasi Banyak CF dari


Aturan yang Berbeda
If P Then Q
If R Then Q

CF1(Q)
CF2(Q)

CF(Q)= CF1(Q) + CF2(Q) - CF1(Q)*CF2(Q)


when CF1 & CF2 positive
= CF1(Q) + CF2(Q) + CF1(Q)*CF2(Q)
when CF1 & CF2 negative
= CF1(Q) + CF2(Q)
1 - Min (| CF1(Q) | , | CF2(Q) |)
otherwise
by Aina Musdholifah, UGM, 2014

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

by Aina Musdholifah, UGM, 2014

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

 Maka: CF(H, E) = CF (H, E1E2E3) = 0.7


Attenuation factor
by Aina Musdholifah, UGM, 2014

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.)


by Aina Musdholifah, UGM, 2014

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

by Aina Musdholifah, UGM, 2014

Contoh2 (lanj.)


by Aina Musdholifah, UGM, 2014

Contoh2 (lanj.)


by Aina Musdholifah, UGM, 2014

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 - Medical Knowledge


= expert system shell

by Aina Musdholifah, UGM, 2014

by Aina Musdholifah, UGM, 2014

by Aina Musdholifah, UGM, 2014

by Aina Musdholifah, UGM, 2014

by Aina Musdholifah, UGM, 2014

Mycin Representation
Facts: (parameter context value CF)
(identity organism_1 klebsiella .25)
(sensitive organism_1 penicillin -1.0)

Rules:

rules + rule paraphrasing

IF (a) the infection is primary-bacteria, and


(b) the site of the culture is one of the sterile sites, and
(c) the suspected portal of entry is the gastrointestinal tract
THEN there is suggestive evidence (.7) that infection is
bacteroid
IF: (AND (same_context infection primary_bacteria)
(membf_context site sterilesite)
(same_context portal GI)
THEN: (conclude context_ident bacteroid tally .7)

by Aina Musdholifah, UGM, 2014

Mycin Inference
Context: Objects discussed by MYCIN
(1) different types, i.e. patient, drug, culture
(2) organised in a tree

Inference Engine: Goal Directed Backward


Chaining
(1) nearly exhaustive depth first search
(2) can reason with uncertainty
(3) can reason with incomplete data

Explanation Facilities: QA module


Why-How questions
by Aina Musdholifah, UGM, 2014

by Aina Musdholifah, UGM, 2014

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

hurt AND fever THEN infected


hurt AND swollen THEN trauma
overload THEN infected
trauma AND red THEN broken
trauma AND moves THEN sprained
by Aina Musdholifah, UGM, 2014

0.6
0.8
0.5
0.8
1.0

Anda mungkin juga menyukai