Why Fuzzy Fuzzy Logic and Sets Fuzzy Reasoning. DKS - Module 7. Why fuzzy thinking?

Similar documents
ARTIFICIAL INTELLIGENCE. Uncertainty: fuzzy systems

Introduction to Fuzzy Logic and Fuzzy Systems Adel Nadjaran Toosi

Introduction 3 Fuzzy Inference. Aleksandar Rakić Contents

Fuzzy Reasoning. Outline

Why Fuzzy? Definitions Bit of History Component of a fuzzy system Fuzzy Applications Fuzzy Sets Fuzzy Boundaries Fuzzy Representation

FUZZY INFERENCE SYSTEMS

Introduction. Aleksandar Rakić Contents

Dinner for Two, Reprise

FUZZY INFERENCE. Siti Zaiton Mohd Hashim, PhD

Chapter 7 Fuzzy Logic Controller

CHAPTER 5 FUZZY LOGIC CONTROL

Fuzzy Systems (1/2) Francesco Masulli

Lecture 5 Fuzzy expert systems: Fuzzy inference Mamdani fuzzy inference Sugeno fuzzy inference Case study Summary

Dra. Ma. del Pilar Gómez Gil Primavera 2014

Fuzzy if-then rules fuzzy database modeling

FUZZY LOGIC TECHNIQUES. on random processes. In such situations, fuzzy logic exhibits immense potential for

Lecture notes. Com Page 1

Fuzzy Logic. Sourabh Kothari. Asst. Prof. Department of Electrical Engg. Presentation By

Introduction 2 Fuzzy Sets & Fuzzy Rules. Aleksandar Rakić Contents

CHAPTER 4 FREQUENCY STABILIZATION USING FUZZY LOGIC CONTROLLER

Fuzzy Expert Systems Lecture 8 (Fuzzy Systems)

Fuzzy Logic Controller

Machine Learning & Statistical Models

Introduction to Fuzzy Logic. IJCAI2018 Tutorial

What is all the Fuzz about?

Fuzzy rule-based decision making model for classification of aquaculture farms

CPS331 Lecture: Fuzzy Logic last revised October 11, Objectives: 1. To introduce fuzzy logic as a way of handling imprecise information

Chapter 4 Fuzzy Logic

Fuzzy logic controllers

7. Decision Making

CHAPTER 3 ADAPTIVE NEURO-FUZZY INFERENCE SYSTEM

Fuzzy If-Then Rules. Fuzzy If-Then Rules. Adnan Yazıcı

Lotfi Zadeh (professor at UC Berkeley) wrote his original paper on fuzzy set theory. In various occasions, this is what he said

REASONING UNDER UNCERTAINTY: FUZZY LOGIC

Unit V. Neural Fuzzy System

GEOG 5113 Special Topics in GIScience. Why is Classical set theory restricted? Contradiction & Excluded Middle. Fuzzy Set Theory in GIScience

Neural Networks Lesson 9 - Fuzzy Logic

Fuzzy Logic. This amounts to the use of a characteristic function f for a set A, where f(a)=1 if the element belongs to A, otherwise it is 0;

FUZZY DATABASE FOR MEDICAL DIAGNOSIS. Rehana Parvin BSc, AIUB, Dhaka, Bangladesh, 2004

About the Tutorial. Audience. Prerequisites. Disclaimer& Copyright. Fuzzy Logic

CHAPTER 3 FUZZY INFERENCE SYSTEM

Fuzzy Sets and Systems. Lecture 1 (Introduction) Bu- Ali Sina University Computer Engineering Dep. Spring 2010

Computational Intelligence Lecture 12:Linguistic Variables and Fuzzy Rules

What is all the Fuzz about?

FUZZY SYSTEMS: Basics using MATLAB Fuzzy Toolbox. Heikki N. Koivo

Computational Intelligence Lecture 10:Fuzzy Sets

Musikasuwan, Salang (2013) Novel fuzzy techniques for modelling human decision making. PhD thesis, University of Nottingham.

CHAPTER 6 SOLUTION TO NETWORK TRAFFIC PROBLEM IN MIGRATING PARALLEL CRAWLERS USING FUZZY LOGIC

* The terms used for grading are: - bad - good

fuzzylite a fuzzy logic control library in C++

Final Exam. Controller, F. Expert Sys.., Solving F. Ineq.} {Hopefield, SVM, Comptetive Learning,

MODELING FOR RESIDUAL STRESS, SURFACE ROUGHNESS AND TOOL WEAR USING AN ADAPTIVE NEURO FUZZY INFERENCE SYSTEM

Speed regulation in fan rotation using fuzzy inference system

Fuzzy Set, Fuzzy Logic, and its Applications

INTERNATIONAL JOURNAL OF COMPUTER ENGINEERING & TECHNOLOGY (IJCET)

CHAPTER 3 FUZZY RULE BASED MODEL FOR FAULT DIAGNOSIS

Figure 2-1: Membership Functions for the Set of All Numbers (N = Negative, P = Positive, L = Large, M = Medium, S = Small)

A Brief Idea on Fuzzy and Crisp Sets

Fuzzy Logic : Introduction

Background Fuzzy control enables noncontrol-specialists. A fuzzy controller works with verbal rules rather than mathematical relationships.

Artificial Intelligence for Interactive Media and Games CS/IMGD 4100 (B 16) 1. Background and Motivation

Contents. The Definition of Fuzzy Logic Rules. Fuzzy Logic and Functions. Fuzzy Sets, Statements, and Rules

ARTIFICIAL INTELLIGENCE - FUZZY LOGIC SYSTEMS

CHAPTER 4 FUZZY LOGIC, K-MEANS, FUZZY C-MEANS AND BAYESIAN METHODS

Fuzzy Systems Handbook

COSC 6339 Big Data Analytics. Fuzzy Clustering. Some slides based on a lecture by Prof. Shishir Shah. Edgar Gabriel Spring 2017.

Florida State University Libraries

Application of fuzzy set theory in image analysis. Nataša Sladoje Centre for Image Analysis

Projecting Safety Measures in Fireworks Factories in Sivakasi using Fuzzy based Approach

VHDL framework for modeling fuzzy automata

Fuzzy Reasoning. Linguistic Variables

CS 354R: Computer Game Technology

Types of Expert System: Comparative Study

Fuzzy Sets and Fuzzy Logic

Development of a Generic and Configurable Fuzzy Logic Systems Library for Real-Time Control Applications using an Object-oriented Approach

Fuzzy system theory originates from fuzzy sets, which were proposed by Professor L.A.

Fuzzy Set Theory and Its Applications. Second, Revised Edition. H.-J. Zimmermann. Kluwer Academic Publishers Boston / Dordrecht/ London

Fuzzy Sets and Fuzzy Logic. KR Chowdhary, Professor, Department of Computer Science & Engineering, MBM Engineering College, JNV University, Jodhpur,

Fuzzy Logic: Human-like decision making

CHAPTER - 3 FUZZY SET THEORY AND MULTI CRITERIA DECISION MAKING

A FUZZY LOGIC APPROACH IN ROBOTIC MOTION CONTROL

SOLUTION: 1. First define the temperature range, e.g. [0 0,40 0 ].

Simple Linear Interpolation Explains All Usual Choices in Fuzzy Techniques: Membership Functions, t-norms, t-conorms, and Defuzzification

Session 102 L, Getting Warm and Fuzzy Beyond Traditional Set Theory. Moderator: Douglas T. Norris, FSA, MAAA, Ph.D.

Study of Fuzzy Set Theory and Its Applications

Figure-12 Membership Grades of x o in the Sets A and B: μ A (x o ) =0.75 and μb(xo) =0.25

A control-based algorithm for rate adaption in MPEG-DASH

Defect Depth Estimation Using Neuro-Fuzzy System in TNDE by Akbar Darabi and Xavier Maldague

SINGLE VALUED NEUTROSOPHIC SETS

COSC 6397 Big Data Analytics. Fuzzy Clustering. Some slides based on a lecture by Prof. Shishir Shah. Edgar Gabriel Spring 2015.

Using a fuzzy inference system for the map overlay problem

Learning of Type-2 Fuzzy Logic Systems using Simulated Annealing

Fuzzy Logic and brief overview of its applications

Fuzzy Logic Approach towards Complex Solutions: A Review

In the Name of God. Lecture 17: ANFIS Adaptive Network-Based Fuzzy Inference System

ANALYTICAL STRUCTURES FOR FUZZY PID CONTROLLERS AND APPLICATIONS

Aircraft Landing Control Using Fuzzy Logic and Neural Networks

Exploring Gaussian and Triangular Primary Membership Functions in Non-Stationary Fuzzy Sets

MECHATRONICS 3M LECTURE NOTES. Prepared by Frank Wornle School of Mechanical Engineering The University of Adelaide 1 0.

A Proposition for using Mathematical Models Based on a Fuzzy System with Application

Transcription:

Fuzzy Systems Overview: Literature: Why Fuzzy Fuzzy Logic and Sets Fuzzy Reasoning chapter 4 DKS - Module 7 1 Why fuzzy thinking? Experts rely on common sense to solve problems Representation of vague, ambiguous terms If short means 300m or less, is 301m long? Fuzzy logic Not logic that is fuzzy But logic that describes fuzzyness = vagueness 2 13/10/09 DKS - Module 7 1

Vague concepts - at least 1.80 m? - could Frank be 1.78 m and be still tall? - if Frank is a basketball player is 1.80m still tall? - if Frank is a kid of 10 years and 1.80 m isn t Frank very tall? 3 13/10/09 DKS - Module 7 Numerical vs. Logic uncertainty reasoning Numerical systems: degree of belief Logical systems: degree of membership 4 13/10/09 DKS - Module 7 2

Fuzzy Logic - I Approach to formal treatment of uncertainty Relies on quantifying and reasoning through natural language uses linguistic variables to describe concepts with vague values tall, large, small, heavy,... Based on the idea that all things admit of degrees Really hot, very tall, kind of small, light blue, 5 13/10/09 DKS - Module 7 Fuzzy Logic - II Boolean logic uses sharp distinctions Fuzzy logic reflects how people think Fuzzy logic is a set of mathematical principles for knowledge representation and reasoning based on degrees of membership 6 13/10/09 DKS - Module 7 3

Fuzzy set Crisp set (tall men): Is a function f: domain [0,1] Fuzzy set (tall men): 7 13/10/09 DKS - Module 7 Fuzzy sets (men s height): Representing a domain 8 13/10/09 DKS - Module 7 4

Membership function Categorization of element x into a set A described through a membership function µ A (x) Formally, given a fuzzy set A of universe X µ A (x): X [0,1], where µ A (x) = 1 if x is totally in A µ A (x) = 0 if x is totally not in A 0 < µ A (x) <1 if x is partially in A (Discrete) Fuzzy set A is represented as: A = {µ A (x 1 )/x 1, µ A (x 2 )/x 2,, µ A (x n )/x n } µ Tall (200) = 1 µ Tall (160) = 0 0 < µ Tall (180) <1 Tall = {0/160, 0.2/170, 0.8/180, 1/190} 9 13/10/09 DKS - Module 7 Operations on Fuzzy Sets Union: µ A B (x) = max(µ A (x), µ B (x)) Intersection: µ A B (x) = min(µ A (x), µ B (x)) Complement: µ A (x) = 1 - µ A (x) 10 13/10/09 DKS - Module 7 5

Fuzzy logic Based on fuzzy set properties Logic OR ( ) is set union A B = µ A B (x) = max(µ A (x), µ B (x)) Logical AND ( ) is set intersection A B = µ A B (x) = min(µ A (x), µ B (x)) Logical NOT ( ) is set complement A = µ A (x) = 1 - µ A (x) 11 13/10/09 DKS - Module 7 Properties of fuzzy sets The same as for crisp sets Commutativity Associativity Distributivity Idempotency Identity De Morgan s Laws 12 13/10/09 DKS - Module 7 6

Linguistic variables A linguistic variable is a fuzzy variable The linguistic variable speed ranges between 0 and 300km/h and includes the fuzzy sets slow, very slow, fast, Fuzzy sets define the linguistic values Hedges are qualifiers of a linguistic variable All purpose: very, quite, extremely Probability: likely, unlikely Quantifiers: most, several, few Possibilities: almost impossible, quite possible 13 13/10/09 DKS - Module 7 Fuzzy set with hedge very 14 13/10/09 DKS - Module 7 7

Interpretation of hedges Hedges modify the shape of a fuzzy set 15 13/10/09 DKS - Module 7 Fuzzy rules A fuzzy rule is defined as a conditional statement of the form IF x is A THEN y is B Where x and y are linguistic variables and A and B are linguistic values determined by fuzzy sets on the universes of discourse X and Y. 16 13/10/09 DKS - Module 7 8

Fuzzy rule example IF height is tall THEN weight is heavy. Where the fuzzy classes height and weight have a given range (i.e. the universe of discourse). range(height) = [140, 220] range(weight) = [50, 250] 17 13/10/09 DKS - Module 7 Reasoning with fuzzy rules In classical systems, rules with true antecedents fire. In fuzzy systems, truth (i.e. membership in some class) is relative so all rules fire (to some extent). 18 13/10/09 DKS - Module 7 9

Applying fuzzy rules If the antecedent is true to some degree, the consequent is true to the same degree. IF length is tall THEN weight is heavy Tall men Heavy men µ Tall (x) = 0.7 µ Heavy (y) = 0.7 19 13/10/09 DKS - Module 7 Multiple antecedents IF x is A AND y is B THEN z is C IF x is A OR y is B THEN z is C Use unification (OR) or intersection (AND) operations to calculate a membership value for the whole antecedent. AND: µ C (z) = min(µ A (x), µ B (y)) OR: µ C (z) = max(µ A (x), µ B (y)) E.g. If rain is heavy AND wind is strong THEN weather is bad ((µ heavy (rain) = 0.7) (µ strong (wind) = 0.4)) (µ bad (weather) = 0.4) 20 13/10/09 DKS - Module 7 10

Multiple consequents IF x is A THEN y is B AND z is C Each consequent is affected equally by the membership in the antecedent class(es). E.g. IF x is tall THEN y is heavy AND z has large feet µ Tall (x) = 0.7 µ Heavy (y) = 0.7 µ LargeFeet (z) = 0.7 21 13/10/09 DKS - Module 7 Fuzzy Events Fuzzy probabilities: What is the probability of meeting a tall man? P(x is A) = Where µ A (x) is the membership function of elements in A P(x) is the probability of x (Empirical evidence) 22 13/10/09 DKS - Module 7 11

Fuzzy probability What is the probability that temperature on July 16 th is around 25 C Based of average temperatures for July 16 th : C 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 P.002.005.005.01.04.11.15.21.16.14.11.04.01.005.002 1 0 20 24 26 30 Around 25 C P(temp is around 25 C) = = Σ µ about25 (x)*p(x) = µ (20)*P(20) + µ(21)*p(21) + + µ(30)*p(30) = 0*0.005 + 0.25*0.01 + 0.5*0.04 + + 0*0.01 = 0.8125 0,8 23 13/10/09 DKS - Module 7 Using hedges The probability that temperature on July 16 th is around 25 C is likely P(temp is about 25 C) = 0.8 Likely with probability 0.95 Very likely with prob. 0.32 0.8 24 13/10/09 DKS - Module 7 12

Fuzzy Inference How to reason using Fuzzy Logic? 1. Fuzzify input variables 2. Evaluate rules 3. Aggregate rule outputs 4. Defuzzify the output 25 13/10/09 DKS - Module 7 Rule 1 w 1 X is A 1 y is B 1 Rule 2 defuzzifier X X is A 2 y is B 2 w 2 Rule r Fuzzy aggregator y X is A r w r y is B r 26 13/10/09 DKS - Module 7 13

Step 1: Fuzzification Use crisp inputs from the user Determine membership values for all the relevant classes (i.e. in right Universe of Discourse). 27 13/10/09 DKS - Module 7 Step 2: Rule evaluation Apply fuzzified inputs to all relevant rules Use union, intersection and complement operations to handle composite antecedents Min-max method for composite antecedents produces clipped functions 28 13/10/09 DKS - Module 7 14

Step 3: Result Aggregation Build membership function for each output (rule consequents) by aggregating all the relevant classes Unification of outputs of all rules 29 13/10/09 DKS - Module 7 Step 4: Defuzzification (Mamdani) Definition: It refers to the way a crisp value is extracted from a fuzzy set as a representative value There are five methods of defuzzifying a fuzzy set A of a universe of discourse Z Centroid of area z COA Bisector of area z BOA Mean of maximum z MOM Smallest of maximum z SOM Largest of maximum z LOM 30 13/10/09 DKS - Module 7 15

Step 4: Defuzzification (Mamdani) Use centre of area formula (centroid technique) to calculate crisp output value Summation as approximation to integral value 31 13/10/09 DKS - Module 7 Step 4: Defuzzification 32 13/10/09 DKS - Module 7 16

Sugeno Fuzzy Models If x is A & y is B then z = f(x, y) Where A & B are fuzzy sets in the antecedent, while z = f(x, y) is a crisp function in the consequent If f(.,.) is a constant then it is a zero-order Sugeno fuzzy model (special case of Mamdani model) Often: Weighted average of singletons in each fuzzy set 33 13/10/09 DKS - Module 7 Exercise Suppose 3 fuzzy rules that determine heart attack risk, based on: Three universes of discourse (UoD): Diet (1000-4000 cal/day): with fuzzy classes poor, good Exercise (1000-4000 cal/day): with fuzzy classes high, low Risk (0-100 likelihood): with fuzzy classes high, low, medium Represent membership functions graphically Show fuzzy inference for following sample data What is the risk of heart disease of Mary who has a diet of 2500 cal/day and spends 1000 cal/day on exercise 34 13/10/09 DKS - Module 7 17

Rules Rule1: Rule2: Rule3: IF diet is poor AND exercise is low THEN risk is high IF diet is good AND exercise is high THEN risk is low IF diet is good OR exercise is high THEN risk is medium 35 13/10/09 DKS - Module 7 Membership function: Diet Mary? 36 13/10/09 DKS - Module 7 18

Membership function: Exercise Mary? 37 13/10/09 DKS - Module 7 Membership function: Risk Mary? 38 13/10/09 DKS - Module 7 19

Mamdani inference 1. Fuzzify input variables Determine membership values 2. Evaluate rules Based on membership values of (composite) antecedents 3. Aggregate rule outputs Unify all membership values for output from all rules 4. Defuzzify the output COG: Center of gravity (approx. by summation) 39 13/10/09 DKS - Module 7 Step 1: fuzzification Fuzzify values for Mary: has a diet of 2500 cal/day and spends 1000 cal/day on exercise µ poordiet (2500) = 0,6 µ gooddiet (2500) = 0,8 µ highexer (1000) = 0 µ lowexer (1000) = 1 40 13/10/09 DKS - Module 7 20

Step 2: rule evaluation Rule1: IF diet is poor (0,6) AND exercise is low (1) THEN risk is high µ A B (x) = min(µ A (x), µ B (x)) = 0,6 Consequent is true to the same degree as the composition of antecedent µ riskhigh (Mary) = 0,6 41 13/10/09 DKS - Module 7 Membership: Risk High 42 13/10/09 DKS - Module 7 21

Step 2 (continuation) RULE1: IF diet is poor (0,6) AND exercise is low (1) THEN risk is high (0,6) RULE2: IF diet is good (0,8) AND exercise is high (0) THEN risk is low (0) RULE3: IF diet is good (0,8) OR exercise is high (0) THEN risk is medium (0,8) 43 13/10/09 DKS - Module 7 Step 3: Aggregation Note that low has been clipped down to zero, and average hasn t been clipped, because the derived µ was higher than the original membership function. The aggregate is simply the union of the three functions. 44 13/10/09 DKS - Module 7 22

Step 4: Defuzzification Centroid technique Example: sample every 12,5 units More points are better, integral is even better COG = 70 45 13/10/09 DKS - Module 7 Result The likelihood of heart disease for Mary is 70% 46 13/10/09 DKS - Module 7 23

Advantages of Fuzzy Logic general theory of uncertainty wide applicability, many practical applications natural use of vague and imprecise concepts helpful for commonsense reasoning, explanation 47 13/10/09 DKS - Module 7 Problems of Fuzzy Logic membership functions can be difficult to find multiple ways for combining evidence problems with long inference chains 48 13/10/09 DKS - Module 7 24

Coming up 20 October 2009: Knowledge Engineering (Evaluation) 27 October 2009: Intelligent Interfaces (Agents and KS) 49 13/10/09 DKS - Module 7 25