Reasoning with Uncertainty Dr Nicholas Gibbins 32/3019.

Slides:



Advertisements
Similar presentations
FT228/4 Knowledge Based Decision Support Systems
Advertisements

Fuzzy Sets and Fuzzy Logic
Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department 1 Lecture 12 Dealing With Uncertainty Probabilistic.
CHAPTER 13 Inference Techniques. Reasoning in Artificial Intelligence n Knowledge must be processed (reasoned with) n Computer program accesses knowledge.
1 Inferences with Uncertainty Decision Support Systems and Intelligent Systems, Efraim Turban and Jay E. Aronson Copyright 1998, Prentice Hall, Upper Saddle.
 Negnevitsky, Pearson Education, Lecture 5 Fuzzy expert systems: Fuzzy inference n Mamdani fuzzy inference n Sugeno fuzzy inference n Case study.
AI – CS364 Fuzzy Logic Fuzzy Logic 3 03 rd October 2006 Dr Bogdan L. Vrusias
Uncertainty in Expert Systems (Certainty Factors).
Rulebase Expert System and Uncertainty. Rule-based ES Rules as a knowledge representation technique Type of rules :- relation, recommendation, directive,
Fuzzy Inference and Defuzzification
Fuzzy Logic The restriction of classical propositional calculus to a two- valued logic has created many interesting paradoxes over the ages. For example,
CLASSICAL LOGIC and FUZZY LOGIC. CLASSICAL LOGIC In classical logic, a simple proposition P is a linguistic, or declarative, statement contained within.
Fuzzy Sets and Applications Introduction Introduction Fuzzy Sets and Operations Fuzzy Sets and Operations.
Chapter 14.7 Russell & Norvig. Fuzzy Sets  Rules of thumb frequently stated in “fuzzy” linguistic terms. John is tall. If someone is tall and well-built.
B. Ross Cosc 4f79 1 Uncertainty Knowledge can have uncertainty associated with it - Knowledge base: rule premises, rule conclusions - User input: uncertain,
1 What is a fuzzy rule? A fuzzy rule can be defined as a conditional statement in the form: IF x is A THEN y is B where x and y are linguistic variables;
Fuzzy Expert System. Basic Notions 1.Fuzzy Sets 2.Fuzzy representation in computer 3.Linguistic variables and hedges 4.Operations of fuzzy sets 5.Fuzzy.
Fuzzy Expert Systems. Lecture Outline What is fuzzy thinking? What is fuzzy thinking? Fuzzy sets Fuzzy sets Linguistic variables and hedges Linguistic.
Final Exam: May 10 Thursday. If event E occurs, then the probability that event H will occur is p ( H | E ) IF E ( evidence ) is true THEN H ( hypothesis.
Certainty and Evidence
Approximate Reasoning 1 Expert Systems Dr. Samy Abu Nasser.
AI – CS364 Uncertainty Management 26 th September 2006 Dr Bogdan L. Vrusias
Lecture 07 Fuzzy Reasoning
6/9/2015Intelligent Systems and Soft Computing1 Lecture 5 Fuzzy expert systems: Fuzzy inference Mamdani fuzzy inference Mamdani fuzzy inference Sugeno.
Fuzzy Expert System.
Chapter 18 Fuzzy Reasoning.
1 Chapter 18 Fuzzy Reasoning. 2 Chapter 18 Contents (1) l Bivalent and Multivalent Logics l Linguistic Variables l Fuzzy Sets l Membership Functions l.
Lecture 05 Rule-based Uncertain Reasoning
WELCOME TO THE WORLD OF FUZZY SYSTEMS. DEFINITION Fuzzy logic is a superset of conventional (Boolean) logic that has been extended to handle the concept.
Fuzzy Sets Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto.
Fuzzy Expert Systems. 2 Fuzzy Logic Four types of fuzzy logics Classic logic Crisp setence: Height(John, 180) → Weight(John, 60) Crisp data: Height(John,
Fuzzy Logic. Lecture Outline Fuzzy Systems Fuzzy Sets Membership Functions Fuzzy Operators Fuzzy Set Characteristics Fuzziness and Probability.
Fuzzy Rules 1965 paper: “Fuzzy Sets” (Lotfi Zadeh) Apply natural language terms to a formal system of mathematical logic
Lecture 5 Fuzzy expert systems: Fuzzy inference Mamdani fuzzy inference Mamdani fuzzy inference Sugeno fuzzy inference Sugeno fuzzy inference Case study.
 Negnevitsky, Pearson Education, Lecture 5 Fuzzy expert systems: Fuzzy inference n Mamdani fuzzy inference n Sugeno fuzzy inference n Case study.
Fuzzy expert systems Chapter #9.
Fuzzy Expert Systems. 2 Motivation On vagueness “Everything is vague to a degree you do not realise until you have tried to make it precise.” Bertrand.
1 CHAPTER 13 Decision Support Systems and Intelligent Systems, Efraim Turban and Jay E. Aronson 6th ed, Copyright 2001, Prentice Hall, Upper Saddle River,
Chapter 13 Inference Techniques Allen. Konica Automates A Help Desk with Case-based Reasoning The situation to be diagnosed is entered into the.
Fuzzy Inference (Expert) System
CS621 : Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 30 Uncertainty, Fuizziness.
Logical Systems and Knowledge Representation Fuzzy Logical Systems 1.
Lógica difusa  Bayesian updating and certainty theory are techniques for handling the uncertainty that arises, or is assumed to arise, from statistical.
Uncertainty Management in Rule-based Expert Systems
Fuzzy Sets and Control. Fuzzy Logic The definition of Fuzzy logic is a form of multi-valued logic derived frommulti-valued logic fuzzy setfuzzy set theory.
“Principles of Soft Computing, 2 nd Edition” by S.N. Sivanandam & SN Deepa Copyright  2011 Wiley India Pvt. Ltd. All rights reserved. CHAPTER 12 FUZZY.
Fuzzy Expert System Fuzzy Inference دكترمحسن كاهاني
International Conference on Fuzzy Systems and Knowledge Discovery, p.p ,July 2011.
Fuzzy Expert System n Introduction n Fuzzy sets n Linguistic variables and hedges n Operations of fuzzy sets n Fuzzy rules n Summary.
Textbook Basics of an Expert System: – “Expert systems: Design and Development,” by: John Durkin, 1994, Chapters 1-4. Uncertainty (Probability, Certainty.
UNIVERSITI TENAGA NASIONAL 1 CCSB354 ARTIFICIAL INTELLIGENCE Chapter 8.2 Certainty Factors Chapter 8.2 Certainty Factors Instructor: Alicia Tang Y. C.
Ch.3 Fuzzy Rules and Fuzzy Reasoning
Fuzzy Relations( 關係 ), Fuzzy Graphs( 圖 形 ), and Fuzzy Arithmetic( 運算 ) Chapter 4.
© Negnevitsky, Pearson Education, Lecture 5 Fuzzy expert systems: Fuzzy inference Mamdani fuzzy inference Mamdani fuzzy inference Sugeno fuzzy inference.
Chapter 3: Fuzzy Rules & Fuzzy Reasoning Extension Principle & Fuzzy Relations (3.2) Fuzzy if-then Rules(3.3) Fuzzy Reasonning (3.4)
REASONING UNDER UNCERTAINTY: CERTAINTY THEORY
Chapter 13 (Continued) Fuzzy Expert Systems 1. Fuzzy Rule-based Expert System 2.
CHAPTER 5 Handling Uncertainty BIC 3337 EXPERT SYSTEM.
Introduction to Fuzzy Logic and Fuzzy Systems
What is a fuzzy rule? IF x is A THEN y is B
Artificial Intelligence CIS 342
Fuzzy expert systems Fuzzy inference Mamdani fuzzy inference
Fuzzy Logic and Fuzzy Sets
Artificial Intelligence and Adaptive Systems
Fuzzy logic Introduction 3 Fuzzy Inference Aleksandar Rakić
CLASSICAL LOGIC and FUZZY LOGIC
Dr. Unnikrishnan P.C. Professor, EEE
Lecture 5 Fuzzy expert systems: Fuzzy inference
Dr. Unnikrishnan P.C. Professor, EEE
Certainty Factor Model
Presentation transcript:

Reasoning with Uncertainty Dr Nicholas Gibbins 32/3019

Reasoning with Uncertainty Three-step Process 1.An expert provides inexact knowledge in terms of rules with likelihood values 2.The inexact knowledge of the basic set of events can be directly used to draw inferences in simple cases (Step 3) 3.Working with the inference engine, experts can adjust the Step 1 input after viewing the results in Steps 2 and 3. In Step 2, the various events are often interrelated. Necessary to combine the information provided in Step 1 into a global value for the system

Reasoning with Uncertainty Major integration methods: –Bayesian probabilities –Dempster-Shafer Theory of evidence –Certainty factors –Fuzzy sets

Eliciting Uncertainty

Numeric Representation of Uncertainty Scale (0-1, 0-100) –0 = Complete uncertainty –1 or 100 = Complete certainty Problems with cognitive biases People may be inconsistent at different times

Graphic and Influence Diagrams Horizontal bars Not as accurate as numbers Experts may not have experience in marking graphic scales Many experts prefer ranking over graphic or numeric methods

Symbolic Representation of Uncertainty Several ways to represent uncertainty Likert Scale –Agreement with a statement –Commonly uses a five-point scale (strongly agree, agree, neutral, disagree, strongly disagree) –Ranking/ordinal Pair-wise Comparison (Analytical Hierarchy Process) Fuzzy logic includes a special symbolic representation combined with numbers

Probabilistic Methods

Probabilities and Related Approaches The Probability Ratio Number of outcomes favouring the occurrence of X P(X) = Total number of outcomes Multiple probability values in many systems –Three-part antecedent (probabilities: 0.9, 0.7 and 0.65) The overall probability: –P = 0.9 * 0.7 * 0.65 = Sometimes one rule references another – individual rule probabilities can propagate from one to another

Several Approaches for Combining Probabilities Probabilities can be –Multiplied (joint probabilities) –Averaged (simple or a weighted average) –Highest value –Lowest value Rules and events are considered independent of each other If dependent, use Bayes’ extension theorem

The Bayesian Extension Bayes' Theorem for combining new and existent evidence usually given as subjective probabilities Revise existing prior probabilities based on new information Based on subjective probabilities; a subjective probability is provided for each proposition

The single value does not tell us much about its precision The single value combines the evidence for and against a proposition without indicating how much there is individually in each The subjective probability expresses the "degree of belief," or how strongly a value or a situation is believed to be true The Bayesian approach, with or without new evidence, can be diagrammed as a network.

Dempster-Shafer Theory of Evidence Distinguishes between uncertainty and ignorance by creating belief functions Especially appropriate for combining expert opinions, since experts do differ in their opinions with a certain degree of ignorance Assumes that the sources of information to be combined are statistically independent

Certainty Factors

Theory of Certainty (Certainty Factors) First used in the MYCIN expert system, developed at Stanford University in the early 1970s Represents uncertainty using measures of belief and disbelief Certainty Factors (CF) express belief in an event (or fact or hypothesis) based on evidence (or the expert's assessment) Assumption: the knowledge content of rules is much more important than the algebra of confidences that holds the system together Assumption: rules are independent

Belief and Disbelief MB(H|E) = measure of belief in hypothesis H given evidence E MD(H|E) = measure of disbelief in hypothesis H given evidence E 1  MB(H|E)  0 while MD(H|E) = 0 or 1  MD(H|E)  0 while MB(H|E) = 0

Certainty Factors CF(H|E)= MB(H|E) – MD(H|E) = certainty of H given E 1  CF(H|E)  -1

Rules and Certainty Rules have certainty as well as facts Typical rule: IF ( (P1 OR P2 OR P3) AND P4) THEN C1 (CF = 0.7) Premises P1…P4 have certainty Conclusion C1 has a certainty of 0.7 –Represents expert’s confidence in the conclusion if all premises are known with complete certainty (CF = 1)

Combining Certainty Factors Must know how CFs are used Several ways to combine CFs –Combining several Certainty Factors in the premises of a rule AND, OR –Applying the Certainty Factor of a rule –Combining the Certainty Factors of a conclusion from multiple rules

AND IF (P1 and P2 and P3) THEN … CF(P1 and P2 and P3) = MIN(CF(P1), CF(P2), CF(P3)) The chain is as strong as its weakest link

AND Example IFinflation is high (A) ANDunemployment rate is above 7 percent (B) ANDbond prices decline (C) THENstock prices decline CF(A) = 0.5, CF(B) = 0.7, CF(C) = 1.0 CF(A and B and C) = MIN[CF(A), CF(B), CF(C)] CF for “stock prices to decline” = 0.5

OR IF (P1 or P2 or P3) … CF(P1 or P2 or P3) = MAX(CF(P1), CF(P2), CF(P3)) Only one IF need be true

OR Example IFinflation is low (A) ORbond prices are high (B) THEN stock prices will be high CF(A) = 0.7, CF(B) = 0.85 CF(A or B) = MAX(CF (A), CF (B)) CF for “stock prices to be high” = 0.85

Applying Rule Certainty Factor Rule R: IFP THENC(CF(R)) CF(C) = CF(P) * CF(R)

Rule Certainty Factor Example IFinflation is high (A) ANDunemployment rate is above 7 percent (B) THENinterest rates will rise (0.6) CF(A) = 0.5, CF(B) = 0.7 CF(A AND B) = 0.5 CF(interest rates will rise) = 0.6 * 0.5 = 0.3

Combining Rules Suppose we have two rules R1 and R2 which each produce the conclusion C with certainty CF(C1) and CF(C1) respectively CF(C) = CF(C1) + CF(C2) – (CF(C1) * CF(C2)) if both CF(C1) and CF(C2) are positive CF(C) = CF(C1) + CF(C2) + (CF(C1) * CF(C2)) if both CF(C1) and CF(C2) are negative CF(C) = CF(C1) + CF(C2) 1 – MIN( |CF(C1)|, |CF(C2)|) otherwise

Combining Rules Example R1:IFthe inflation rate is less than 5 percent, THENstock market prices go up (CF = 0.7) R2:IFunemployment level is less than 7 percent, THENstock market prices go up (CF = 0.6) Inflation rate = 4 percent Unemployment level = 6.5 percent

Combining Rules Example Assume an independent relationship between the rules CF(C1) = 0.7, CF(C2) = 0.6 CF(C1,C2) = ( ) - (0.7 * 0.6) = 0.88 Overall certainty that stock market will rise is 0.88

Third Rule Additional rules are added by reducing CF(C1,C2,C3) = CF(C1,C2) + CF(C3) – (CF(C1,C2) * CF(C3)) R3:IFbond price increases THENstock prices go up (CF = 0.85) Assuming all rules are true in their IF part, the chance that stock prices will go up is CF(C1,C2,C3) = (0.88 * 0.85) = 0.982

Fuzzy Logic

Representation of uncertainty based on the notion of linguistic variables and values For example: “John is tall” –The linguistic variable “John’s height”… –…takes the linguistic value “tall” “Tall” isn’t a clearly defined notion “Tall” can be qualified –“Very tall” –“Somewhat tall” –“Extremely tall”

Fuzzy Sets Consider classical sets: –A set is defined as a group of individuals: S = { a, b, c, d, e } –We say that a, b, c, etc are members of S (that is, a ∈ S, etc) –Set membership is a boolean proposition: Either a ∈ S or a ∉ S In the terminology of fuzzy sets, such sets are crisp

Fuzzy Sets We can take a functional view of membership in S Define S in terms of a function from the set of all individuals U to the set {0,1} μ S : U → {0,1} where μ S (x) =1,if x ∈ S 0,if x ∉ S

Fuzzy Sets Example: U = {a,b,c,d,e,f,g,h} S = {b,d,f,g} Represented as a function, we would have: μ S = {‹a,0›, ‹b,1›, ‹c,0›, ‹d,1›, ‹e,0›, ‹f,1›, ‹g,1›, ‹h,0›}

Fuzzy Sets We can generalise this view of sets Consider the interval [0,1] as the range of the membership functions –‹a,0› means that a is not a member –‹a,1› means that a is a member –‹a,0.75› means that a is mostly a member –‹a,0.25› means that a is mostly not a member –… In practice, “membership function” and “fuzzy set” are used interchangeably

From Fuzzy Sets to Fuzzy Logic Consider the concept of “tallness” We could define the set of tall people by basing the set membership function on their height: μ tall (x) = 0,if height(x) < 1.5m (height(x)-1.5)/0.5,if 1.5m ≤ height(x) ≤ 2.0m 1,otherwise height(x) 1.5m2.0m μ tall (x)

Hedges Qualifiers for linguistic values Terms that modify the shape of fuzzy sets height(x) 1.5m2.0m μ tall (x) height(x) 1.5m2.0m μ very tall (x)

Hedges Very μ A (x) 2 Extremely μ A (x) 3 Somewhat √μ A (x) Indeed 2μ A (x) 2 if 0 ≤ μ A (x) ≤ (1- μ A (x)) 2 otherwise

From Fuzzy Sets to Fuzzy Logic We can define the effect of the usual set operators on the membership function: Set complement μ U\A = 1 - μ A Set intersection μ A ∩ B = MIN(μ A, μ B ) Set union μ A ∪ B = MAX(μ A, μ B ) Subset A ⊂ B ⇔ ∀ x. μ A ≤ μ B

Fuzzy Logic Reinterpret membership of an object a in a set S as the degree of truth of a ∈ S Alternatively, consider an interpretation function for first- order logic –Maps unary predicates onto a subset of Δ (domain of discourse - equivalent to the universal set) Membership function is equivalent to a fuzzy interpretation for a unary predicate

Fuzzy Logical Operators Straightforward correspondence with set operators (as with propositional logic) Not μ ¬A = 1 - μ A And μ A ∧ B = MIN(μ A, μ B ) Or μ A ∨ B = MAX(μ A, μ B )

Fuzzy Logical Operators MIN/MAX is not the only interpretation for AND/OR –Original interpretation, suggested by Zadeh –Also known as Gödel fuzzy logic Product fuzzy logic –μ A ∧ B = μ A.μ B –μ A ∨ B = μ A + μ B - μ A.μ B Łukasiewicz fuzzy logic –μ A ∧ B = MAX(0, μ A +μ B -1) –μ A ∨ B = MIN(μ A +μ B, 1) Others similarly derived from other definitions for triangular norms (t-norms - logical conjunction) and t-conorms (logical disjunction)

Fuzzy Description Logic We can also apply fuzzy techniques to DLs Replace the crisp interpretation function I –Maps concepts onto subsets of the domain –Maps relationships onto subsets of New interpretation function is fuzzy –Maps concepts onto fuzzy subsets of –Maps relationships onto fuzzy subsets of

Fuzzy Description Logics We can now define fuzzy semantics for DL constructs as follows: is the degree to which d is a member of concept C under interpretation I

Fuzzy Rules General form: IF x is A THEN y is B x, y are linguistic variables A, B are linguistic values defined as fuzzy sets Example: IF height is tall THEN weight is heavy

Monotonic Selection We can estimate the value of the output of the rule consequent directly from the antecedent height(x) 1.5m2.0m μ tall (x) weight(x) 70kg100kg μ heavy (x)

Fuzzy Inference Two common approaches: Mamdani-style and Sugeno- style Both approaches have four steps: 1.Fuzzification 2.Rule evaluation 3.Aggregation 4.Defuzzification

Mamdani-style Rules IF is AND is … THEN is

Example Rule 1: IFfunding is adequate (A3) ORstaffing is small (B1) THENrisk is low (C1) Rule 2: IFfunding is marginal (A2) ANDstaffing is large (B2) THENrisk is normal (C2) Rule 3: IFfunding is inadequate (A1) THENrisk is high (C3)

Example funding staffing risk B1B2A1A2A3C1C2C

Fuzzification Take crisp inputs, determine degree of membership in fuzzy sets –Funding is x1 –Staffing is y1 B1B2A1A2A3 x1y1 μ B1 (y1) μ B2 (y1) μ A1 (x1) μ A2 (x1) μ A3 (x1)

Rule Evaluation Take fuzzified inputs and apply them to the antecedents of the fuzzy rules 1.IFfunding is adequate (A3) ORstaffing is small (B1) THENrisk is low (C1) μ C1 = μ A3 ∨ B1 = MAX(μ A3, μ B1 ) 2.IFfunding is marginal (A2) ANDstaffing is large (B2) THENrisk is normal (C2) μ C2 = μ A2 ∧ B2 = MIN(μ A2, μ B2 ) 3.IFfunding is inadequate (A1) THENrisk is high (C3) μ C3 = μ A1

A3B1 Rule 1 Evaluation μ C1 = μ A3 ∨ B1 = MAX(μ A3, μ B1 ) x1y1 C1 MAX B2A1A2 C2 C3

Rule 2 Evaluation μ C2 = μ A2 ∧ B2 = MIN(μ A2, μ B2 ) B1B2A1A2A3 x1y1 C1 C2 C3 MIN

Rule 3 Evaluation μ C3 = μ A1 B1B2A1A2A3 x1 μ A1 (x1) C1 C2 C3

Rule Output Aggregation Combine output from each rule into a single fuzzy set C1 C2 C3C1 C2 C3C1 C2 C3C1 C2 C3

Defuzzification Calculate crisp value from resulting fuzzy set Most popular technique identifies centroid (centre of gravity) C1 C2 C3

Calculating Centroids

Criticisms Defuzzification in Mamdani-style inference requires us to calculate a centroid –need to integrate a continuously varying function –not computationally efficient

Sugeno-style Inference Consequents of rules use a singleton membership function A fuzzy singleton is a fuzzy set that =1 at a particular point, and =0 everywhere else 0 1

Sugeno-style Rules IF is AND is … THEN is f(, …) f(x,y) is a function

Sugeno-style Rules Zero-order Sugeno model uses constant value: IF is AND is … THEN is

Example Rule 1: IFfunding is adequate (A3) ORstaffing is small (B1) THENrisk is k1 Rule 2: IFfunding is marginal (A2) ANDstaffing is large (B2) THENrisk is k2 Rule 3: IFfunding is inadequate (A1) THENrisk is k3

Example funding staffing risk B1B2A1A2A k1k2k3

Fuzzification Take crisp inputs, determine degree of membership in fuzzy sets –Funding is x1 –Staffing is y1 B1B2A1A2A3 x1y1 μ B1 (y1) μ B2 (y1) μ A1 (x1) μ A2 (x1) μ A3 (x1)

Rule Evaluation Take fuzzified inputs and apply them to the antecedents of the fuzzy rules 1.IFfunding is adequate (A3) ORstaffing is small (B1) THENrisk is k1 μ k1 = μ A3 ∨ B1 = MAX(μ A3, μ B1 ) 2.IFfunding is marginal (A2) ANDstaffing is large (B2) THENrisk is k2 μ k2 = μ A2 ∧ B2 = MIN(μ A2, μ B2 ) 3.IFfunding is inadequate (A1) THENrisk is k3 μ k3 = μ A1

A3B1 Rule 1 Evaluation μ k1 = μ A3 ∨ B1 = MAX(μ A3, μ B1 ) x1y1 MAX B2A1A2 k1

Rule 2 Evaluation μ k2 = μ A2 ∧ B2 = MIN(μ A2, μ B2 ) B1B2A1A2A3 x1y1 MIN k2

Rule 3 Evaluation μ k3 = μ A1 B1B2A1A2A3 x1 μ A1 (x1) k3

Rule Output Aggregation Combine output from each rule into a single fuzzy set k1k2k3 k1 k2 k3

Defuzzification Calculate crisp value from resulting fuzzy set Use weighted average

Weighted Average (μ k1 * k1) + (μ k2 * k2) + (μ k3 * k3) μ k1 + μ k2 + μ k3

Summary Information is partial Information is not fully reliable Information is approximate Representation language is inherently imprecise Information comes from multiple sources and is conflicting Non-absolute cause-effect relationships exist Can include uncertainty in rules