SlideShare una empresa de Scribd logo
1 de 44
Chapter - 7




              Kecerdasan Buatan
                          Artificial Intelligence

                        Sistem Pakar – 3
Penanganan Ketidakpastian Berbasis Rule (Certainty Factor)




                                  Tb. Ai Munandar, M.T.,
                          Universitas Serang Raya - 2012
Outline
•   Pendahuluan
•   Teori Probabilitas
•   Teorema Bayes
•   Studi Kasus
Uncertainty: Introduction

• Dalam Sistem berbasis pengetahuan,
  sering kali sistem harus mengambil
  kesimpulan yang benar dari bukti yang
  lemah dan tidak pasti

• Bukan hal yang mustahil. Sering kita
  lakukan dengan sukses dalam hampir
  semua aspek kehidupan kita untuk dapat
  bertahan hidup.

                                           3
Uncertainty: Introduction
• Misal :
  - kita mengerti suatu kalimat yang tidak lengkap
  - Dokter memberikan medical treatment yang
    benar untuk symptom yang ambigu;

• Salah satu karakteristik dari informasi yang
  tersedia     bagi     seorang       pakar adalah
  ketidaksempurnaan, yaitu informasi dapat :
  incomplete, inconsistent, uncertain




                                                     4
So, how to define the term “Uncertainty”?

• Uncertainty didefinisikan sebagai : kurangnya ”exact
  knowledge” yang memungkinkan kita membuat konklusi
  yang tepat.
• Hal ini disebabkan karena informasi yang tersedia tidak
  sempurna, seperti : tidak konsisten, tidak lengkap, tidak
  pasti
• Can be a problem because it may prevent us from making
  the best decision or may even cause bad decision to be
  made



                                                              5
Uncertainty: Introduction
•    The type of uncertainty may be caused by problems
     with data such as:
       • Data might be missing or unavailable
       • Data might be present but unreliable or
           ambiguous
       • The representation of the data may be imprecise
           or inconsistent
       • Data may just be user’s best guest
       • Data may be based on defaults and defaults may
           have exceptions
Introduction
•   Reasoning under uncertainty involves 3 important
    issues:
       • How to represent uncertain data
       • How to combine two or more pieces of
         uncertain data
       • How to draw inference using uncertain data
There are many approaches
to representing uncertainty
           in AI.



                              8
Uncertainty Handling Methods

•   Abductive reasoning                E.g. Suppose:
                                If x is a bird then x flies
•   Property inheritance   Abductive reasoning would say that
                                 “All fly things are birds”
•   Fuzzy logic                 By property inheritance

    Certainty Factor (CF)
                                     “All birds can fly”
•                             but, remember the case that
                                   Penguin cannot fly?

•   Bayes theorem
•   Dempster-Shafer theory


                                                                9
Evaluation Criteria for
  uncertainty handling methods

• Expressive power
• Logical correctness
• Computational efficiency of
  inference


                                 10
Scheme used by expert system in
        Handling Uncertainty

• MYCIN (sistem pakar deteksi penyakit
  kelainan darah ) uses Certainty Factor
    • The CF can be used to rank hypotheses in order of
      importance.
    • For example if a patient has certain symptoms that
      suggest several possible diseases, then the disease
      with the higher CF would be the one that is first
      investigated.
• PROSPECTOR (sistem pakar untuk eksplorasi
  mineral) uses Bayes theorem
                                                            11
UNCERTAIN EVIDENCE
•   Representing uncertain evidence
    CF (E) = CF (It will probably rain today)
          = 0.6
•   Similar to P(E), however, CF are not
    probabilities but measures of confidence
•   Derajat yang menunjukkan kita percaya bahwa
    fakta benar
•   It written as exact term but add CF value to it
    Example: It will rain today CF 0.6
Certainty Theory
• Certainty factors measure the confidence that
  is placed on a conclusion based on the
  evidence known so far.
• Certainty factors combine belief and disbelief
  into a single number based on some evidence
• A certainty factor is the difference between
  the following two components :
                      CF = MB[h:e] - MD[h:e]


A positive CF means the evidence supports the hypothesis since MB > MD.
                                                                    13
Certainty Theory
1. Measures of Belief (MB)
    Number that reflects the measure of increased
    belief in a hypothesis H based on evidence E
              0 MB 1

2. Measures of Disbelief (MD)
   Number that reflects the measure of increase
   disbelief in a hypothesis H based on evidence E
            0 MD 1
Certainty Theory
3. Certainty Factor
   Number that reflects the net level of belief in a
   hypothesis given available information
           CF = MB - MD
           -1 CF 1
Certainty Theory
•       Uncertain evidence is given CF or certainty factor value
        ranging from -1 (completely false ) to 1 (completely true).

•       Negative values degree of disbelief

•       Positive values degree of belief

•       Range of CF values

    false   Possibly False   Unknown   Possible True      True
     -1                           0                     1
    Measures of disbelief                     Measures of belief
Certainty Theory: Values Interpretation

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
Certainty Theory
•   Basic structure of rule in certainty model
      IF E THEN H CF (Rule)

•   CF (Rule) = level of belief of H given E

•   Given that E is true, we believe H according to:
      CF (H, E) = CF (Rule)
Certainty Theory
•   Example:
    IF     There are dark cloud     -E
    THEN It will rain         - H CF = 0.8

•   This rule reads:
      “If there are dark clouds then it will almost
    certainly        rain”

•   CF (H, E) similar P (H|E)
Certainty Factor Propagation (C.F.P)
CFP FOR SINGLE PREMISE RULE
Menetapkan tingkat kepercayaan pada konklusi suatu rule (H)
ketika fakta (E) yang termuat dalam rule premise tidak pasti

          CF (H, E) = CF (E) X CF (RULE)

Example
From previous rule:
       CF (E) = 0.5
       C.F.P. is
       CF (H, E) = 0.5 x 0.8
               = 0.4 #
In words: It maybe raining
Certainty Factor Propagation (C.F.P)

For same rule, with negative evidence for rule
premise to the degree of CF (E) = -0.5

C.F.P is
        CF (H, E) = -0.5 * 0.8
                 = -0.4 #

In words: It maybe not raining.
Certainty Factor Propagation (C.F.P)

CFP FOR MULTIPLE RULE PREMISE

• For rules with more than one
  premises:
   – conjunctive rules (AND)
   – disjunctive rules (OR)
Certainty Factor Propagation (C.F.P)

CFP FOR MULTIPLE RULE PREMISE

•   Conjunctive Rule
    IF EI AND E2 AND ... THEN H CF (RULE)
    CF (H, E1 AND E2 AND..) = min {CF (Ei)} * CF
    (RULE)

•   min function returns minimum value of a set of
    numbers.
Certainty Factor Propagation (C.F.P)
Example:
IF     The sky is dark
AND The wind is getting stronger
THEN It will rain            CF = 0.8
Assume:
CF (the sky is dark)                   = 1.0
CF (the wind is getting stronger)      = 0.7
CF (It will rain)                = min {1.0,0.7} * 0.8
                                 = 0.56 #
In words: It probably will rain
Certainty Factor Propagation (C.F.P)
CFP FOR MULTIPLE RULE PREMISE

•   Disjunctive Rule (OR)

    IF E1 OR E2 OR ... THEN H CF (RULE)
    CF (H, E1 OR E2 OR..) = Max {CF (Ei)} * CF (RULE)

•   Max function returns the maximum value of a set
    of numbers
Certainty Factor Propagation (C.F.P)

•   Example:
    IF         the sky is dark
    OR         the wind is getting stronger
    THEN It will rain              CF = 0.9
    CF (It will rain) = max {1.0, 0.7} * 0.9
                    = 0.9 #

•   In words:       It almost certainly will rain
Certainty Factor Propagation (C.F.P)

CFP SIMILARLY CONCLUDED RULES
• For multiple rules that support a
  hypothesis (same hypothesis)

• Consider from 2 individuals:
   – weatherman
   – farmer
Certainty Factor Propagation (C.F.P)
Rule 1
IF     the weatherman says it is going to rain       (E1)
THEN It is going to rain                       (H)
   CF (Rule 1) = 0.8

Rule 2
IF     the farmer says it is going to rain    (E2)
THEN It is going to rain                      (H)
   CF (Rule 2) = 0.8
Certainty Factor Propagation (C.F.P)

• CF of both rules set to equal implying
  equal confidence in the 2 sources

• Naturally more confident in conclusion
Certainty Factor Propagation (C.F.P)
FORMULA FOR INCREMENTALLY ACQUIRED EVIDENCE

CFcombined (CF1, CF2)
    = CF1 + CF2 * (1 - CF1)         Both 0

    =        CF1 + CF2                     One 0
        1 - min {|CF1|,|CF2|}

   = CF1 + CF2 * (1 + CF1)           Both 0
where,
   CF1 = confidence in H established by one rule (RULE 1)
   CF2 = confidence in it established by one rule (RULE 2)
   CF1 = CF1 (H, E)
   CF2 = CF2 (H, E)
Certainty Factor Propagation (C.F.P)

•   There are 2 properties of the equations:
     – Commutative:
         • allow evidence to be gathered in any order
     – Asymptotic:
         • If more than one source confirm a
           hypothesis then a person will feels more
           confident. Incrementally add belief to a
           hypothesis as new positive evidence is
           obtained
Certainty Factor Propagation (C.F.P)
Example
Consider Rain Prediction: Rule 1 and 2
Explore several cases

Case 1: Weatherman and Farmer Certain in Rain
     CF (E1) = CF (E2) = 1.0

     CF1 (H, E1) = CF (E1) * CF (RULE 1)
                                                C.F.P.
     = 1.0 * 0.8 = 0.8                          for
                                                single
   CF2 (H, E2)   =CF (E2) * CF (RULE 2)         Premise
                                                Rule
     = 1. 0 * 0.8 = 0.8
Certainty Factor Propagation (C.F.P)

Since both > 0,

CFcombine (CF1, CF2)   = CF1 + CF2 * (1 - CF1)
                       = 0.8 + 0.8 * (1 - 0.8)
                       = 0.96 #


CF supported by > 1 rule can be incrementally
   increase more confident
Certainty Factor Propagation (C.F.P)
Case 2: Weatherman certain in rain, Farmer certain no rain
CF (E1) = 1.0        CF (E2) = -1.0
CF1 (H, E1)   = CF (E1) * CF (RULE 1)
              = 1.0 * 0.8 = 0.8

CF2 (H, E2)     = CF (E2) * CF (RULE 2)
                = -1.0 * 0.8 = -0.8
Since either one < 0
CFcombined (CF1, CF2) =       CF1 + CF2
                        1 - min {|CF1|,|CF2|}
                        =     0.8 + (-0.8)
                         1 - min {0.8,0.8}
                        =0#
CF set to unknown because one say “no” and the other one say
“yes”
Certainty Factor Propagation (C.F.P)
Case 3: Weatherman and Farmer believe at different degrees that
it is going to rain
CF (E1) = -0.8           CF (E2) = -0.6
CF1 (H, E1)      = CF (E1) * CF (RULE 1)
                 = -0.8 x 0.8
                 = -0.64
CF2 (H, E2)      = CF (E2) * CF (RULE 2)
                 = -0.6 * 0.8
                 = -0.48
Since both < 0
CFcombined (CF1, CF2) = CF1 + CF2 * (1 + CF1)
                         = - 0.64 - 0.48 * (1 - 0.64)
                         = -0.81 #
Show incremental decrease when more than one source
disconfirming evidence is found
Certainty Factor Propagation (C.F.P)
Case 4: Several Sources Predict Rain at the same level of belief but
one source predicts no rain
If many sources predict rain at the same level, CF(Rain) = 0.8, the CF
value converge towards 1
CFcombined (CF1, CF2 ..)        0.999 = CFold
CFold = collected old sources info.
If new source say negative
         CFnew = -0.8 then,
         CFcombined (CFold, CFnew)
                 =        CFold + CFnew
                     1 - min { CFold, CFnew }
                 = 0.999-0.8
                     1 - 0.8
                 = 0.995
Shows single disconfirming evidence does not have major impact
Certainty Factor Propagation (C.F.P)
CERTAINTY PROPAGATION FOR COMPLEX RULES
Combination of conjunctive and disjunctive statement (“AND”,
“OR”)

Example:
   IF      E1
   AND     E2
   OR      E3          max
   AND     E4
   THEN    H

   CF (H) = Max {min (E1, E2), min (E3, E4)} * CF (RULE)
Certainty factors
• Consider two rules:
    (R1) hasHair  mammal                        CF(R1) = 0.9
    (R2) forwardEyes & sharpTeeth  mammal       CF(R2) = 0.7

• We now know that:
• CF(hasHair) = 0.8   CF(forwardEyes) = 0.75 CF(sharpTeeth) = 0.3
• CF(forwardEyes sharpTeeth) = min( 0.75, 0.3 ) = 0.3
Given the premise CF, how do you combine with the CF for the rule?
    CF(H, Rule) = CF(E) * CF(Rule)
    So, CF(mammal, R1) = CF(hasHair) * CF(R1) = 0.8 * 0.9 = 0.72
        CF(mammal, R2) = CF(forwardEyes sharpTeeth) * CF(R2)
                         = 0.3 * 0.7
                         = 0.21
Certainty factors
Given diff rules with same conclusion, how do you combine
CF's?
   CF(H, Rule1 & Rule2) = CF(H, Rule1) + CF(H, Rule2)*(1-
     CF(H,Rule1))

  So, CF(mammal, R1 & R2)
           = CF(mammal, R1) + CF(mammal, R2)*(1-
    CF(mammal,R1))
           = 0.72 + 0.21*0.28
           = 0.72 + 0.0588
           = 0.7788
  note: CF(mammal, R1 & R2) = CF(mammal, R2 & R1)
LATIHAN
• To Illustrate CF through a set of rules, we consider a small
  problem of deciding whether or not I should go to a ball game.

• Assume the hypothesis “I should not go to the ball game”.

Rule 1
IF     the weather looks lousy           E1
OR     I am in a lousy mood              E2
THEN I shouldn’t go to the ball game          H1 CF = 0.9
LATIHAN

Rule 2
IF         I believe it is going to rain      E3
THEN the weather looks lousy            E1 CF = 0.8

Rule 3
IF          I believe it is going to rain            E3
AND the weatherman says it is going to rain          E4
THEN I am in a lousy mood                E2 CF = 0.9
LATIHAN
Rule 4
IF     the weatherman says it is going to rain E4
THEN the weather looks lousy        E1 CF = 0.7

Rule 5
IF     the weather looks lousy            E1
THEN I am in a lousy mood          E2 CF = 0.95
LATIHAN
Assume the following CF:
  I believe it is going to rain
      CF(E3) = 0.95
  Weatherman believes it is going to rain
      CF(E4) = 0.85
Kelebihan Metode CF
• Suatu model komputasi yang sederhana
  yang memungkinkan pakar mengestimasi
  kepercayaaannya dalam konklusi
• Mengijinkan ekspresi kepercayaan dan
  ketidakpercayaan dalam tiap hipotesis
• Menggabungkan nilai CF lebih mudah
  dibandingkan metode lain

Más contenido relacionado

La actualidad más candente

Propositional And First-Order Logic
Propositional And First-Order LogicPropositional And First-Order Logic
Propositional And First-Order Logicankush_kumar
 
Propositional logic & inference
Propositional logic & inferencePropositional logic & inference
Propositional logic & inferenceSlideshare
 
Uncertain knowledge and reasoning
Uncertain knowledge and reasoningUncertain knowledge and reasoning
Uncertain knowledge and reasoningShiwani Gupta
 
Introduction to Statistical Machine Learning
Introduction to Statistical Machine LearningIntroduction to Statistical Machine Learning
Introduction to Statistical Machine Learningmahutte
 
Uncertain Knowledge and Reasoning in Artificial Intelligence
Uncertain Knowledge and Reasoning in Artificial IntelligenceUncertain Knowledge and Reasoning in Artificial Intelligence
Uncertain Knowledge and Reasoning in Artificial IntelligenceExperfy
 
Artificial intelligence- Logic Agents
Artificial intelligence- Logic AgentsArtificial intelligence- Logic Agents
Artificial intelligence- Logic AgentsNuruzzaman Milon
 
First order logic in knowledge representation
First order logic in knowledge representationFirst order logic in knowledge representation
First order logic in knowledge representationSabaragamuwa University
 
Dempster Shafer Theory AI CSE 8th Sem
Dempster Shafer Theory AI CSE 8th SemDempster Shafer Theory AI CSE 8th Sem
Dempster Shafer Theory AI CSE 8th SemDigiGurukul
 
Artificial Intelligence Notes Unit 3
Artificial Intelligence Notes Unit 3Artificial Intelligence Notes Unit 3
Artificial Intelligence Notes Unit 3DigiGurukul
 
Dinive conquer algorithm
Dinive conquer algorithmDinive conquer algorithm
Dinive conquer algorithmMohd Arif
 
Concept learning and candidate elimination algorithm
Concept learning and candidate elimination algorithmConcept learning and candidate elimination algorithm
Concept learning and candidate elimination algorithmswapnac12
 
Fuzzy Logic ppt
Fuzzy Logic pptFuzzy Logic ppt
Fuzzy Logic pptRitu Bafna
 
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...vikas dhakane
 

La actualidad más candente (20)

Propositional And First-Order Logic
Propositional And First-Order LogicPropositional And First-Order Logic
Propositional And First-Order Logic
 
Propositional logic & inference
Propositional logic & inferencePropositional logic & inference
Propositional logic & inference
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
 
Uncertainty in AI
Uncertainty in AIUncertainty in AI
Uncertainty in AI
 
Uncertain knowledge and reasoning
Uncertain knowledge and reasoningUncertain knowledge and reasoning
Uncertain knowledge and reasoning
 
Introduction to Statistical Machine Learning
Introduction to Statistical Machine LearningIntroduction to Statistical Machine Learning
Introduction to Statistical Machine Learning
 
Uncertain Knowledge and Reasoning in Artificial Intelligence
Uncertain Knowledge and Reasoning in Artificial IntelligenceUncertain Knowledge and Reasoning in Artificial Intelligence
Uncertain Knowledge and Reasoning in Artificial Intelligence
 
Artificial intelligence- Logic Agents
Artificial intelligence- Logic AgentsArtificial intelligence- Logic Agents
Artificial intelligence- Logic Agents
 
First order logic in knowledge representation
First order logic in knowledge representationFirst order logic in knowledge representation
First order logic in knowledge representation
 
Propositional Logic and Pridicate logic
Propositional Logic and Pridicate logicPropositional Logic and Pridicate logic
Propositional Logic and Pridicate logic
 
Dempster Shafer Theory AI CSE 8th Sem
Dempster Shafer Theory AI CSE 8th SemDempster Shafer Theory AI CSE 8th Sem
Dempster Shafer Theory AI CSE 8th Sem
 
FUZZY LOGIC
FUZZY LOGICFUZZY LOGIC
FUZZY LOGIC
 
Artificial Intelligence Notes Unit 3
Artificial Intelligence Notes Unit 3Artificial Intelligence Notes Unit 3
Artificial Intelligence Notes Unit 3
 
Rabin karp string matcher
Rabin karp string matcherRabin karp string matcher
Rabin karp string matcher
 
Dinive conquer algorithm
Dinive conquer algorithmDinive conquer algorithm
Dinive conquer algorithm
 
Concept learning and candidate elimination algorithm
Concept learning and candidate elimination algorithmConcept learning and candidate elimination algorithm
Concept learning and candidate elimination algorithm
 
Fuzzy Logic ppt
Fuzzy Logic pptFuzzy Logic ppt
Fuzzy Logic ppt
 
K Nearest Neighbors
K Nearest NeighborsK Nearest Neighbors
K Nearest Neighbors
 
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...
 
Module 4 part_1
Module 4 part_1Module 4 part_1
Module 4 part_1
 

Destacado

Tugas AI (fransisca loren) TPA Sore
Tugas AI (fransisca loren)   TPA SoreTugas AI (fransisca loren)   TPA Sore
Tugas AI (fransisca loren) TPA Sorefransiscaloren
 
PROBABILITY- BAYE'S THEOREM
PROBABILITY- BAYE'S THEOREM PROBABILITY- BAYE'S THEOREM
PROBABILITY- BAYE'S THEOREM Niraj Dasani
 
Bayeasian inference
Bayeasian inferenceBayeasian inference
Bayeasian inferenceGlobal Polis
 
Practical Non-Monotonic Reasoning
Practical Non-Monotonic ReasoningPractical Non-Monotonic Reasoning
Practical Non-Monotonic ReasoningGuido Governatori
 
Applied Bayesian Inference with PyMC
Applied Bayesian Inference with PyMCApplied Bayesian Inference with PyMC
Applied Bayesian Inference with PyMCMarco Santoni
 
Cerutti--Introduction to Argumentation (seminar @ University of Aberdeen)
Cerutti--Introduction to Argumentation (seminar @ University of Aberdeen)Cerutti--Introduction to Argumentation (seminar @ University of Aberdeen)
Cerutti--Introduction to Argumentation (seminar @ University of Aberdeen)Federico Cerutti
 
Bayesian Inference using b8
Bayesian Inference using b8Bayesian Inference using b8
Bayesian Inference using b8Dave Ross
 
2015 2016 sem 2 tm 4031 group 12
2015 2016 sem 2 tm 4031 group 122015 2016 sem 2 tm 4031 group 12
2015 2016 sem 2 tm 4031 group 12Rudy Valentino
 
04 reasoning systems
04 reasoning systems04 reasoning systems
04 reasoning systemsJohn Issac
 
Makalah Fuzzy Logic Dan Penerapannya
Makalah Fuzzy Logic Dan PenerapannyaMakalah Fuzzy Logic Dan Penerapannya
Makalah Fuzzy Logic Dan Penerapannyaradar radius
 
Contoh peyelesaian logika fuzzy
Contoh peyelesaian logika fuzzyContoh peyelesaian logika fuzzy
Contoh peyelesaian logika fuzzyZaenal Khayat
 

Destacado (20)

Tugas AI (fransisca loren) TPA Sore
Tugas AI (fransisca loren)   TPA SoreTugas AI (fransisca loren)   TPA Sore
Tugas AI (fransisca loren) TPA Sore
 
Tugas Kecerdasan Buatan
Tugas Kecerdasan BuatanTugas Kecerdasan Buatan
Tugas Kecerdasan Buatan
 
Mycin
MycinMycin
Mycin
 
PROBABILITY- BAYE'S THEOREM
PROBABILITY- BAYE'S THEOREM PROBABILITY- BAYE'S THEOREM
PROBABILITY- BAYE'S THEOREM
 
Certainty Factor Theory
Certainty Factor TheoryCertainty Factor Theory
Certainty Factor Theory
 
Answer quiz minimax
Answer quiz minimaxAnswer quiz minimax
Answer quiz minimax
 
Logika fuzzy
Logika fuzzyLogika fuzzy
Logika fuzzy
 
Bayeasian inference
Bayeasian inferenceBayeasian inference
Bayeasian inference
 
Practical Non-Monotonic Reasoning
Practical Non-Monotonic ReasoningPractical Non-Monotonic Reasoning
Practical Non-Monotonic Reasoning
 
Applied Bayesian Inference with PyMC
Applied Bayesian Inference with PyMCApplied Bayesian Inference with PyMC
Applied Bayesian Inference with PyMC
 
Cerutti--Introduction to Argumentation (seminar @ University of Aberdeen)
Cerutti--Introduction to Argumentation (seminar @ University of Aberdeen)Cerutti--Introduction to Argumentation (seminar @ University of Aberdeen)
Cerutti--Introduction to Argumentation (seminar @ University of Aberdeen)
 
Inexact reasoning
Inexact reasoningInexact reasoning
Inexact reasoning
 
Ai 6
Ai 6Ai 6
Ai 6
 
Bayesian Inference using b8
Bayesian Inference using b8Bayesian Inference using b8
Bayesian Inference using b8
 
2015 2016 sem 2 tm 4031 group 12
2015 2016 sem 2 tm 4031 group 122015 2016 sem 2 tm 4031 group 12
2015 2016 sem 2 tm 4031 group 12
 
04 reasoning systems
04 reasoning systems04 reasoning systems
04 reasoning systems
 
Makalah Fuzzy Logic Dan Penerapannya
Makalah Fuzzy Logic Dan PenerapannyaMakalah Fuzzy Logic Dan Penerapannya
Makalah Fuzzy Logic Dan Penerapannya
 
Contoh peyelesaian logika fuzzy
Contoh peyelesaian logika fuzzyContoh peyelesaian logika fuzzy
Contoh peyelesaian logika fuzzy
 
Bab iv-ketidakpastian
Bab iv-ketidakpastianBab iv-ketidakpastian
Bab iv-ketidakpastian
 
Sistem Cerdas
Sistem CerdasSistem Cerdas
Sistem Cerdas
 

Similar a Ai 7

Certinity Factor and Dempster-shafer theory .pptx
Certinity Factor and Dempster-shafer theory .pptxCertinity Factor and Dempster-shafer theory .pptx
Certinity Factor and Dempster-shafer theory .pptxRamakrishna Reddy Bijjam
 
Representing uncertainty in expert systems
Representing uncertainty in expert systemsRepresenting uncertainty in expert systems
Representing uncertainty in expert systemsbhupendra kumar
 
The replication crisis: are P-values the problem and are Bayes factors the so...
The replication crisis: are P-values the problem and are Bayes factors the so...The replication crisis: are P-values the problem and are Bayes factors the so...
The replication crisis: are P-values the problem and are Bayes factors the so...jemille6
 
The replication crisis: are P-values the problem and are Bayes factors the so...
The replication crisis: are P-values the problem and are Bayes factors the so...The replication crisis: are P-values the problem and are Bayes factors the so...
The replication crisis: are P-values the problem and are Bayes factors the so...StephenSenn2
 
1-Theory of Computation_formal proofs.pptx
1-Theory of Computation_formal proofs.pptx1-Theory of Computation_formal proofs.pptx
1-Theory of Computation_formal proofs.pptxFathimaAmana1
 
AI_Probability.pptx
AI_Probability.pptxAI_Probability.pptx
AI_Probability.pptxssuserc8e745
 
What should we expect from reproducibiliry
What should we expect from reproducibiliryWhat should we expect from reproducibiliry
What should we expect from reproducibiliryStephen Senn
 
If you liked it you should've put a p-value on it ...or not
If you liked it you should've put a p-value on it ...or notIf you liked it you should've put a p-value on it ...or not
If you liked it you should've put a p-value on it ...or notKrzysztof Gorgolewski
 
Earthquake dhnjggbnkkkknvcxsefghjk gyjhvcdyj
Earthquake dhnjggbnkkkknvcxsefghjk gyjhvcdyjEarthquake dhnjggbnkkkknvcxsefghjk gyjhvcdyj
Earthquake dhnjggbnkkkknvcxsefghjk gyjhvcdyjjansisce
 
Mayo class #7 March 6 slides
Mayo class #7 March 6 slidesMayo class #7 March 6 slides
Mayo class #7 March 6 slidesjemille6
 
Chapter8 Introduction to Estimation Hypothesis Testing.pdf
Chapter8 Introduction to Estimation Hypothesis Testing.pdfChapter8 Introduction to Estimation Hypothesis Testing.pdf
Chapter8 Introduction to Estimation Hypothesis Testing.pdfmekkimekki5
 
probability reasoning
probability reasoningprobability reasoning
probability reasoningsdrhr
 

Similar a Ai 7 (18)

Certinity Factor and Dempster-shafer theory .pptx
Certinity Factor and Dempster-shafer theory .pptxCertinity Factor and Dempster-shafer theory .pptx
Certinity Factor and Dempster-shafer theory .pptx
 
Representing uncertainty in expert systems
Representing uncertainty in expert systemsRepresenting uncertainty in expert systems
Representing uncertainty in expert systems
 
The replication crisis: are P-values the problem and are Bayes factors the so...
The replication crisis: are P-values the problem and are Bayes factors the so...The replication crisis: are P-values the problem and are Bayes factors the so...
The replication crisis: are P-values the problem and are Bayes factors the so...
 
The replication crisis: are P-values the problem and are Bayes factors the so...
The replication crisis: are P-values the problem and are Bayes factors the so...The replication crisis: are P-values the problem and are Bayes factors the so...
The replication crisis: are P-values the problem and are Bayes factors the so...
 
1-Theory of Computation_formal proofs.pptx
1-Theory of Computation_formal proofs.pptx1-Theory of Computation_formal proofs.pptx
1-Theory of Computation_formal proofs.pptx
 
AI_Probability.pptx
AI_Probability.pptxAI_Probability.pptx
AI_Probability.pptx
 
What should we expect from reproducibiliry
What should we expect from reproducibiliryWhat should we expect from reproducibiliry
What should we expect from reproducibiliry
 
If you liked it you should've put a p-value on it ...or not
If you liked it you should've put a p-value on it ...or notIf you liked it you should've put a p-value on it ...or not
If you liked it you should've put a p-value on it ...or not
 
CS3491-Unit-2 Uncertainty.pptx
CS3491-Unit-2 Uncertainty.pptxCS3491-Unit-2 Uncertainty.pptx
CS3491-Unit-2 Uncertainty.pptx
 
Earthquake dhnjggbnkkkknvcxsefghjk gyjhvcdyj
Earthquake dhnjggbnkkkknvcxsefghjk gyjhvcdyjEarthquake dhnjggbnkkkknvcxsefghjk gyjhvcdyj
Earthquake dhnjggbnkkkknvcxsefghjk gyjhvcdyj
 
Bayes' theorem
Bayes' theoremBayes' theorem
Bayes' theorem
 
Bayesian Statistics.pdf
Bayesian Statistics.pdfBayesian Statistics.pdf
Bayesian Statistics.pdf
 
12주차
12주차12주차
12주차
 
Mayo class #7 March 6 slides
Mayo class #7 March 6 slidesMayo class #7 March 6 slides
Mayo class #7 March 6 slides
 
Chapter8 Introduction to Estimation Hypothesis Testing.pdf
Chapter8 Introduction to Estimation Hypothesis Testing.pdfChapter8 Introduction to Estimation Hypothesis Testing.pdf
Chapter8 Introduction to Estimation Hypothesis Testing.pdf
 
Int journal of cf hs91aim
Int journal of cf hs91aimInt journal of cf hs91aim
Int journal of cf hs91aim
 
probability reasoning
probability reasoningprobability reasoning
probability reasoning
 
11.pdf
11.pdf11.pdf
11.pdf
 

Más de bayaws

Más de bayaws (6)

Ai 5
Ai 5Ai 5
Ai 5
 
Ai 4
Ai 4Ai 4
Ai 4
 
Ai 4
Ai 4Ai 4
Ai 4
 
Ai 3
Ai 3Ai 3
Ai 3
 
Ai 2
Ai 2Ai 2
Ai 2
 
Ai 1
Ai 1Ai 1
Ai 1
 

Ai 7

  • 1. Chapter - 7 Kecerdasan Buatan Artificial Intelligence Sistem Pakar – 3 Penanganan Ketidakpastian Berbasis Rule (Certainty Factor) Tb. Ai Munandar, M.T., Universitas Serang Raya - 2012
  • 2. Outline • Pendahuluan • Teori Probabilitas • Teorema Bayes • Studi Kasus
  • 3. Uncertainty: Introduction • Dalam Sistem berbasis pengetahuan, sering kali sistem harus mengambil kesimpulan yang benar dari bukti yang lemah dan tidak pasti • Bukan hal yang mustahil. Sering kita lakukan dengan sukses dalam hampir semua aspek kehidupan kita untuk dapat bertahan hidup. 3
  • 4. Uncertainty: Introduction • Misal : - kita mengerti suatu kalimat yang tidak lengkap - Dokter memberikan medical treatment yang benar untuk symptom yang ambigu; • Salah satu karakteristik dari informasi yang tersedia bagi seorang pakar adalah ketidaksempurnaan, yaitu informasi dapat : incomplete, inconsistent, uncertain 4
  • 5. So, how to define the term “Uncertainty”? • Uncertainty didefinisikan sebagai : kurangnya ”exact knowledge” yang memungkinkan kita membuat konklusi yang tepat. • Hal ini disebabkan karena informasi yang tersedia tidak sempurna, seperti : tidak konsisten, tidak lengkap, tidak pasti • Can be a problem because it may prevent us from making the best decision or may even cause bad decision to be made 5
  • 6. Uncertainty: Introduction • The type of uncertainty may be caused by problems with data such as: • Data might be missing or unavailable • Data might be present but unreliable or ambiguous • The representation of the data may be imprecise or inconsistent • Data may just be user’s best guest • Data may be based on defaults and defaults may have exceptions
  • 7. Introduction • Reasoning under uncertainty involves 3 important issues: • How to represent uncertain data • How to combine two or more pieces of uncertain data • How to draw inference using uncertain data
  • 8. There are many approaches to representing uncertainty in AI. 8
  • 9. Uncertainty Handling Methods • Abductive reasoning E.g. Suppose: If x is a bird then x flies • Property inheritance Abductive reasoning would say that “All fly things are birds” • Fuzzy logic By property inheritance Certainty Factor (CF) “All birds can fly” • but, remember the case that Penguin cannot fly? • Bayes theorem • Dempster-Shafer theory 9
  • 10. Evaluation Criteria for uncertainty handling methods • Expressive power • Logical correctness • Computational efficiency of inference 10
  • 11. Scheme used by expert system in Handling Uncertainty • MYCIN (sistem pakar deteksi penyakit kelainan darah ) uses Certainty Factor • The CF can be used to rank hypotheses in order of importance. • For example if a patient has certain symptoms that suggest several possible diseases, then the disease with the higher CF would be the one that is first investigated. • PROSPECTOR (sistem pakar untuk eksplorasi mineral) uses Bayes theorem 11
  • 12. UNCERTAIN EVIDENCE • Representing uncertain evidence CF (E) = CF (It will probably rain today) = 0.6 • Similar to P(E), however, CF are not probabilities but measures of confidence • Derajat yang menunjukkan kita percaya bahwa fakta benar • It written as exact term but add CF value to it Example: It will rain today CF 0.6
  • 13. Certainty Theory • Certainty factors measure the confidence that is placed on a conclusion based on the evidence known so far. • Certainty factors combine belief and disbelief into a single number based on some evidence • A certainty factor is the difference between the following two components : CF = MB[h:e] - MD[h:e] A positive CF means the evidence supports the hypothesis since MB > MD. 13
  • 14. Certainty Theory 1. Measures of Belief (MB) Number that reflects the measure of increased belief in a hypothesis H based on evidence E 0 MB 1 2. Measures of Disbelief (MD) Number that reflects the measure of increase disbelief in a hypothesis H based on evidence E 0 MD 1
  • 15. Certainty Theory 3. Certainty Factor Number that reflects the net level of belief in a hypothesis given available information CF = MB - MD -1 CF 1
  • 16. Certainty Theory • Uncertain evidence is given CF or certainty factor value ranging from -1 (completely false ) to 1 (completely true). • Negative values degree of disbelief • Positive values degree of belief • Range of CF values false Possibly False Unknown Possible True True -1 0 1 Measures of disbelief Measures of belief
  • 17. Certainty Theory: Values Interpretation 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
  • 18. Certainty Theory • Basic structure of rule in certainty model IF E THEN H CF (Rule) • CF (Rule) = level of belief of H given E • Given that E is true, we believe H according to: CF (H, E) = CF (Rule)
  • 19. Certainty Theory • Example: IF There are dark cloud -E THEN It will rain - H CF = 0.8 • This rule reads: “If there are dark clouds then it will almost certainly rain” • CF (H, E) similar P (H|E)
  • 20. Certainty Factor Propagation (C.F.P) CFP FOR SINGLE PREMISE RULE Menetapkan tingkat kepercayaan pada konklusi suatu rule (H) ketika fakta (E) yang termuat dalam rule premise tidak pasti CF (H, E) = CF (E) X CF (RULE) Example From previous rule: CF (E) = 0.5 C.F.P. is CF (H, E) = 0.5 x 0.8 = 0.4 # In words: It maybe raining
  • 21. Certainty Factor Propagation (C.F.P) For same rule, with negative evidence for rule premise to the degree of CF (E) = -0.5 C.F.P is CF (H, E) = -0.5 * 0.8 = -0.4 # In words: It maybe not raining.
  • 22. Certainty Factor Propagation (C.F.P) CFP FOR MULTIPLE RULE PREMISE • For rules with more than one premises: – conjunctive rules (AND) – disjunctive rules (OR)
  • 23. Certainty Factor Propagation (C.F.P) CFP FOR MULTIPLE RULE PREMISE • Conjunctive Rule IF EI AND E2 AND ... THEN H CF (RULE) CF (H, E1 AND E2 AND..) = min {CF (Ei)} * CF (RULE) • min function returns minimum value of a set of numbers.
  • 24. Certainty Factor Propagation (C.F.P) Example: IF The sky is dark AND The wind is getting stronger THEN It will rain CF = 0.8 Assume: CF (the sky is dark) = 1.0 CF (the wind is getting stronger) = 0.7 CF (It will rain) = min {1.0,0.7} * 0.8 = 0.56 # In words: It probably will rain
  • 25. Certainty Factor Propagation (C.F.P) CFP FOR MULTIPLE RULE PREMISE • Disjunctive Rule (OR) IF E1 OR E2 OR ... THEN H CF (RULE) CF (H, E1 OR E2 OR..) = Max {CF (Ei)} * CF (RULE) • Max function returns the maximum value of a set of numbers
  • 26. Certainty Factor Propagation (C.F.P) • Example: IF the sky is dark OR the wind is getting stronger THEN It will rain CF = 0.9 CF (It will rain) = max {1.0, 0.7} * 0.9 = 0.9 # • In words: It almost certainly will rain
  • 27. Certainty Factor Propagation (C.F.P) CFP SIMILARLY CONCLUDED RULES • For multiple rules that support a hypothesis (same hypothesis) • Consider from 2 individuals: – weatherman – farmer
  • 28. Certainty Factor Propagation (C.F.P) Rule 1 IF the weatherman says it is going to rain (E1) THEN It is going to rain (H) CF (Rule 1) = 0.8 Rule 2 IF the farmer says it is going to rain (E2) THEN It is going to rain (H) CF (Rule 2) = 0.8
  • 29. Certainty Factor Propagation (C.F.P) • CF of both rules set to equal implying equal confidence in the 2 sources • Naturally more confident in conclusion
  • 30. Certainty Factor Propagation (C.F.P) FORMULA FOR INCREMENTALLY ACQUIRED EVIDENCE CFcombined (CF1, CF2) = CF1 + CF2 * (1 - CF1) Both 0 = CF1 + CF2 One 0 1 - min {|CF1|,|CF2|} = CF1 + CF2 * (1 + CF1) Both 0 where, CF1 = confidence in H established by one rule (RULE 1) CF2 = confidence in it established by one rule (RULE 2) CF1 = CF1 (H, E) CF2 = CF2 (H, E)
  • 31. Certainty Factor Propagation (C.F.P) • There are 2 properties of the equations: – Commutative: • allow evidence to be gathered in any order – Asymptotic: • If more than one source confirm a hypothesis then a person will feels more confident. Incrementally add belief to a hypothesis as new positive evidence is obtained
  • 32. Certainty Factor Propagation (C.F.P) Example Consider Rain Prediction: Rule 1 and 2 Explore several cases Case 1: Weatherman and Farmer Certain in Rain CF (E1) = CF (E2) = 1.0 CF1 (H, E1) = CF (E1) * CF (RULE 1) C.F.P. = 1.0 * 0.8 = 0.8 for single CF2 (H, E2) =CF (E2) * CF (RULE 2) Premise Rule = 1. 0 * 0.8 = 0.8
  • 33. Certainty Factor Propagation (C.F.P) Since both > 0, CFcombine (CF1, CF2) = CF1 + CF2 * (1 - CF1) = 0.8 + 0.8 * (1 - 0.8) = 0.96 # CF supported by > 1 rule can be incrementally increase more confident
  • 34. Certainty Factor Propagation (C.F.P) Case 2: Weatherman certain in rain, Farmer certain no rain CF (E1) = 1.0 CF (E2) = -1.0 CF1 (H, E1) = CF (E1) * CF (RULE 1) = 1.0 * 0.8 = 0.8 CF2 (H, E2) = CF (E2) * CF (RULE 2) = -1.0 * 0.8 = -0.8 Since either one < 0 CFcombined (CF1, CF2) = CF1 + CF2 1 - min {|CF1|,|CF2|} = 0.8 + (-0.8) 1 - min {0.8,0.8} =0# CF set to unknown because one say “no” and the other one say “yes”
  • 35. Certainty Factor Propagation (C.F.P) Case 3: Weatherman and Farmer believe at different degrees that it is going to rain CF (E1) = -0.8 CF (E2) = -0.6 CF1 (H, E1) = CF (E1) * CF (RULE 1) = -0.8 x 0.8 = -0.64 CF2 (H, E2) = CF (E2) * CF (RULE 2) = -0.6 * 0.8 = -0.48 Since both < 0 CFcombined (CF1, CF2) = CF1 + CF2 * (1 + CF1) = - 0.64 - 0.48 * (1 - 0.64) = -0.81 # Show incremental decrease when more than one source disconfirming evidence is found
  • 36. Certainty Factor Propagation (C.F.P) Case 4: Several Sources Predict Rain at the same level of belief but one source predicts no rain If many sources predict rain at the same level, CF(Rain) = 0.8, the CF value converge towards 1 CFcombined (CF1, CF2 ..) 0.999 = CFold CFold = collected old sources info. If new source say negative CFnew = -0.8 then, CFcombined (CFold, CFnew) = CFold + CFnew 1 - min { CFold, CFnew } = 0.999-0.8 1 - 0.8 = 0.995 Shows single disconfirming evidence does not have major impact
  • 37. Certainty Factor Propagation (C.F.P) CERTAINTY PROPAGATION FOR COMPLEX RULES Combination of conjunctive and disjunctive statement (“AND”, “OR”) Example: IF E1 AND E2 OR E3 max AND E4 THEN H CF (H) = Max {min (E1, E2), min (E3, E4)} * CF (RULE)
  • 38. Certainty factors • Consider two rules: (R1) hasHair  mammal CF(R1) = 0.9 (R2) forwardEyes & sharpTeeth  mammal CF(R2) = 0.7 • We now know that: • CF(hasHair) = 0.8 CF(forwardEyes) = 0.75 CF(sharpTeeth) = 0.3 • CF(forwardEyes sharpTeeth) = min( 0.75, 0.3 ) = 0.3 Given the premise CF, how do you combine with the CF for the rule? CF(H, Rule) = CF(E) * CF(Rule) So, CF(mammal, R1) = CF(hasHair) * CF(R1) = 0.8 * 0.9 = 0.72 CF(mammal, R2) = CF(forwardEyes sharpTeeth) * CF(R2) = 0.3 * 0.7 = 0.21
  • 39. Certainty factors Given diff rules with same conclusion, how do you combine CF's? CF(H, Rule1 & Rule2) = CF(H, Rule1) + CF(H, Rule2)*(1- CF(H,Rule1)) So, CF(mammal, R1 & R2) = CF(mammal, R1) + CF(mammal, R2)*(1- CF(mammal,R1)) = 0.72 + 0.21*0.28 = 0.72 + 0.0588 = 0.7788 note: CF(mammal, R1 & R2) = CF(mammal, R2 & R1)
  • 40. LATIHAN • To Illustrate CF through a set of rules, we consider a small problem of deciding whether or not I should go to a ball game. • Assume the hypothesis “I should not go to the ball game”. Rule 1 IF the weather looks lousy E1 OR I am in a lousy mood E2 THEN I shouldn’t go to the ball game H1 CF = 0.9
  • 41. LATIHAN Rule 2 IF I believe it is going to rain E3 THEN the weather looks lousy E1 CF = 0.8 Rule 3 IF I believe it is going to rain E3 AND the weatherman says it is going to rain E4 THEN I am in a lousy mood E2 CF = 0.9
  • 42. LATIHAN Rule 4 IF the weatherman says it is going to rain E4 THEN the weather looks lousy E1 CF = 0.7 Rule 5 IF the weather looks lousy E1 THEN I am in a lousy mood E2 CF = 0.95
  • 43. LATIHAN Assume the following CF: I believe it is going to rain CF(E3) = 0.95 Weatherman believes it is going to rain CF(E4) = 0.85
  • 44. Kelebihan Metode CF • Suatu model komputasi yang sederhana yang memungkinkan pakar mengestimasi kepercayaaannya dalam konklusi • Mengijinkan ekspresi kepercayaan dan ketidakpercayaan dalam tiap hipotesis • Menggabungkan nilai CF lebih mudah dibandingkan metode lain