Fuzzy Logic and Fuzzy Set Theory
Some Fuzzy Background
Lofti Zadeh has coined the term “Fuzzy Set” in 1965 and
opened a new field of research and applications
A Fuzzy Set is a class with different degrees of membership.
Almost all real world classes are fuzzy!
Examples of fuzzy sets include: {‘Tall people’}, {‘Nice day’},
{‘Round object’} …
If a person’s height is 1.88 meters is he considered ‘tall’?
What if we also know that he is an NBA player?
2
Some Related Fields
Fuzzy
Logic &
Fuzzy Set
Theory
Evidence
Theory
Pattern
Recognition
& Image
Processing
Control
Theory
Knowledge
Engineering
3
Overview
L. Zadeh
D. Dubois
H. Prade
J.C. Bezdek
R.R. Yager
M. Sugeno
E.H. Mamdani
G.J. Klir
J.J. Buckley
4
Membership
Functions
Linguistic
Hedges
Aggregation
Operations
Image
Processing
Fuzzy
Morphology
Fuzzy
Measures Fuzzy
Integrals
Fuzzy
Expert
Systems
Speech
Spectrogram
Reading
A Crisp Definition of Fuzzy Logic
• Does not exist, however …
- Fuzzifies bivalent Aristotelian (Crisp) logic
Is “The sky are blue” True or False?
• Modus Ponens
IF <Antecedent == True> THEN <Do Consequent>
IF (X is a prime number) THEN (Send TCP packet)
• Generalized Modus Ponens
IF “a region is green and highly textured”
AND “the region is somewhat below a sky region”
THEN “the region contains trees with high confidence”
5
Fuzzy Inference (Expert) Systems
Input_1 Fuzzy
IF-THEN
Rules
OutputInput_2
Input_3
6
Fuzzy Vs. Probability
Walking in the desert, close to being
dehydrated, you find two bottles of water:
The first contains deadly poison with a
probability of 0.1
The second has a 0.9 membership value in the
Fuzzy Set “Safe drinks”
Which one will you choose to drink from???
7
Membership Functions (MFs)
• What is a MF?
• Linguistic Variable
• A Normal MF attains ‘1’ and ‘0’ for some input
• How do we construct MFs?
– Heuristic
– Rank ordering
– Mathematical Models
– Adaptive (Neural Networks, Genetic Algorithms …)
    1 2 1 2, 1, 0A Ax x x x    
8
Membership Function Examples
TrapezoidalTriangular
   
1
, ,
1
smf a x c
f x a c
e 


Sigmoid
 
 2
2
2
; ,
x c
gmff x c e 

 

Gaussian
 ; , , , max min ,1, ,0
x a d x
f x a b c d
b a d c
    
      
 ; , , max min , , 0
x a c x
f x a b c
b a c b
    
      9
Alpha Cuts
  AA x X x    
  AA x X x
    
Strong Alpha Cut
Alpha Cut
0 
0.2  0.5  0.8  1 
10
Linguistic Hedges
Operate on the Membership Function (Linguistic Variable)
1. Expansive (“Less”, ”Very Little”)
2. Restrictive (“Very”, “Extremely”)
3. Reinforcing/Weakening (“Really”, “Relatively”)
 Less x
 4Very Little x
  
2
Very x
  
4
Extremely x
   A Ax x c  
11
Aggregation Operations
 


1
21
21 ,,, 






 

n
aaa
aaah n
n


 0 0, ,1iand a i i n       
, min
1 ,
0 ,
1 ,
, max
h
h Harmonic Mean
h Geometric Mean
h Algebraic Mean
h










   
  
 
 
  
Generalized Mean:
12
Aggregation Operations (2)
• Fixed Norms (Drastic, Product, Min)
• Parametric Norms (Yager)
T-norms:
 
, 1
, , 1
0 ,
D
b if a
T a b a if b
otherwise


 


Drastic Product
   , min ,ZT a b a b ,T a b a b  
Zadehian
 ,BSS a b a b a b     
, 0
, , 0
1 ,
D
b if a
S a b a if b
otherwise


 


S-Norm Duals:
   , max ,ZS a b a b
Bounded Sum DrasticZadehian
13
Aggregation Operations (3)
Drastic
T-Norm
Product
Zadehian
min
Generalized Mean
Zadehian
max
Bounded
Sum
Drastic
S-Norm
Algebraic (Mean)
Geometric
Harmonic
b (=0.8)a (=0.3)
      
1
, min 1, 0,w w w
u a b a b for w   
Yager S-Norm
Yager S-Norm for varying w
14
Crisp Vs. Fuzzy
Fuzzy Sets
• Membership values on [0,1]
• Law of Excluded Middle and Non-
Contradiction do not necessarily
hold:
• Fuzzy Membership Function
• Flexibility in choosing the
Intersection (T-Norm), Union (S-
Norm) and Negation operations
Crisp Sets
• True/False {0,1}
• Law of Excluded Middle and Non-
Contradiction hold:
• Crisp Membership Function
• Intersection (AND) , Union (OR),
and Negation (NOT) are fixed
A A
A A
  
  
A A
A A
  
  
15
Binary
Gray Level
Color (RGB,HSV etc.)
Can we give a crisp definition to light blue?
16
Fuzziness Vs. Vagueness
Vagueness=Insufficient Specificity
“I will be back
sometime”
Fuzzy Vague
“I will be back in
a few minutes”
Fuzzy
Fuzziness=Unsharp Boundaries
17
Fuzziness
“As the complexity of a system increases, our ability
to make precise and yet significant statements
about its behavior diminishes” – L. Zadeh
• A possible definition of fuzziness of an image:
 2
min ,ij ij
i j
Fuzz
M N
  


18
Example: Finding an Image Threshold
Membership Value
Gray Level
   
1
, ,
1
smf a x c
f x a c
e 


19
Fuzzy Inference (Expert) Systems
Service
Time
Fuzzy
IF-THEN
Rules
Tip Level
Food
Quality
Ambiance
Fuzzify:
Apply MF on
input
Generalized Modus Ponens
with specified aggregation
operations
Defuzzify:
Method of Centroid,
Maximum, ...
20
Examples of Fuzzy Variables:
Distance between formants (Large/Small)
Formant location (High/Mid/Low)
Formant length (Long/Average/Short)
Zero crossings (Many/Few)
Formant movement (Descending/Ascending/Fixed)
VOT= Voice Onset Time (Long/Short)
Phoneme duration (Long/Average/Short)
Pitch frequency (High/Low/Undetermined)
Blob (F1/F2/F3/F4/None)
“Don’t ask me to carry…"
21
Applying the Segmentation Algorithm
22
Suggested Fuzzy Inference System
Feature Vector
from Spectrogram
Identify Phoneme
Class using Fuzzy
IF-THEN Rules
Vowels Find Vowel
Fricatives
Nasals
Output Fuzzy MF
for each
Phoneme
23
Assign a Fuzzy Value for
each Phoneme, Output
Highest N Values to a
Linguistic model
Summary
24
• Fuzzy Logic can be useful in solving Human related tasks
• Evidence Theory gives tools to handle knowledge
• Membership functions and Aggregation methods can be selected
according to the problem at hand
Some things we didn’t talk about:
• Fuzzy C-Means (FCM) clustering algorithm
• Dempster-Schafer theory of combining evidence
• Fuzzy Relation Equations (FRE)
• Compositions
• Fuzzy Entropy
References
[1] G. J. Klir ,U. S. Clair, B. Yuan“Fuzzy Set Theory: Foundations and Applications “, Prentice Hall PTR 1997, ISBN:
978-0133410587
[2] H.R. Tizhoosh;“Fast fuzzy edge detection” Fuzzy Information Processing Society, Annual Meeting of the North
American, pp. 239 – 242, 27-29 June 2002.
[3] A.K. Hocaoglu; P.D. Gader; “ An interpretation of discrete Choquet integrals in morphological image processing
Fuzzy Systems “, Fuzzy Systems, FUZZ '03. Vol. 2, 25-28, pp. 1291 – 1295, May 2003.
[4] E.R. Daugherty, “An introduction to Morphological Image Processing”, SPlE Optical Engineering Press,
Bellingham, Wash., 1992.
[5] A. Dumitras, G. Moschytz, “Understanding Fuzzy Logic – An interview with Lofti Zadeh”, IEEE Signal Processing
Magazine, May 2007
[6] J.M. Yang; J.H. Kim, ”A multisensor decision fusion strategy using fuzzy measure theory ”, Intelligent Control,
Proceedings of the 1995 IEEE International Symposium on, pp. 157 – 162, Aug. 1995
[7] R. Steinberg, D. O’Shaugnessy ,”Segmentation of a Speech Spectrogram using Mathematical Morphology ” ,To
be presented at ICASSP 2008.
[8] J.C. Bezdek, J. Keller, R. Krisnapuram, N.R. Pal, ” Fuzzy Models and Algorithms for Pattern Recognition and Image
Processing ” Springer 2005, ISBN: 0-387-245 15-4
[9] W. Siler, J.J. Buckley,“Fuzzy Expert Systems and Fuzzy Reasoning“, John Wiley & Sons, 2005, Online ISBN:
9780471698500
[10] http://pami.uwaterloo.ca/tizhoosh/fip.htm
[11] "Heavy-tailed distribution." Wikipedia, The Free Encyclopedia. 22 Jan 2008, 17:43 UTC. Wikimedia Foundation,
Inc. 3 Feb 2008 http://en.wikipedia.org/w/index.php?title=Heavy-tailed_distribution&oldid=186151469
[12] T.J. Ross, “Fuzzy Logic with Engineering Applications”, McGraw-Hill 1997. ISBN: 0070539170
25

Fuzzy logic

  • 1.
    Fuzzy Logic andFuzzy Set Theory
  • 2.
    Some Fuzzy Background LoftiZadeh has coined the term “Fuzzy Set” in 1965 and opened a new field of research and applications A Fuzzy Set is a class with different degrees of membership. Almost all real world classes are fuzzy! Examples of fuzzy sets include: {‘Tall people’}, {‘Nice day’}, {‘Round object’} … If a person’s height is 1.88 meters is he considered ‘tall’? What if we also know that he is an NBA player? 2
  • 3.
    Some Related Fields Fuzzy Logic& Fuzzy Set Theory Evidence Theory Pattern Recognition & Image Processing Control Theory Knowledge Engineering 3
  • 4.
    Overview L. Zadeh D. Dubois H.Prade J.C. Bezdek R.R. Yager M. Sugeno E.H. Mamdani G.J. Klir J.J. Buckley 4 Membership Functions Linguistic Hedges Aggregation Operations Image Processing Fuzzy Morphology Fuzzy Measures Fuzzy Integrals Fuzzy Expert Systems Speech Spectrogram Reading
  • 5.
    A Crisp Definitionof Fuzzy Logic • Does not exist, however … - Fuzzifies bivalent Aristotelian (Crisp) logic Is “The sky are blue” True or False? • Modus Ponens IF <Antecedent == True> THEN <Do Consequent> IF (X is a prime number) THEN (Send TCP packet) • Generalized Modus Ponens IF “a region is green and highly textured” AND “the region is somewhat below a sky region” THEN “the region contains trees with high confidence” 5
  • 6.
    Fuzzy Inference (Expert)Systems Input_1 Fuzzy IF-THEN Rules OutputInput_2 Input_3 6
  • 7.
    Fuzzy Vs. Probability Walkingin the desert, close to being dehydrated, you find two bottles of water: The first contains deadly poison with a probability of 0.1 The second has a 0.9 membership value in the Fuzzy Set “Safe drinks” Which one will you choose to drink from??? 7
  • 8.
    Membership Functions (MFs) •What is a MF? • Linguistic Variable • A Normal MF attains ‘1’ and ‘0’ for some input • How do we construct MFs? – Heuristic – Rank ordering – Mathematical Models – Adaptive (Neural Networks, Genetic Algorithms …)     1 2 1 2, 1, 0A Ax x x x     8
  • 9.
    Membership Function Examples TrapezoidalTriangular    1 , , 1 smf a x c f x a c e    Sigmoid    2 2 2 ; , x c gmff x c e      Gaussian  ; , , , max min ,1, ,0 x a d x f x a b c d b a d c              ; , , max min , , 0 x a c x f x a b c b a c b            9
  • 10.
    Alpha Cuts  AA x X x       AA x X x      Strong Alpha Cut Alpha Cut 0  0.2  0.5  0.8  1  10
  • 11.
    Linguistic Hedges Operate onthe Membership Function (Linguistic Variable) 1. Expansive (“Less”, ”Very Little”) 2. Restrictive (“Very”, “Extremely”) 3. Reinforcing/Weakening (“Really”, “Relatively”)  Less x  4Very Little x    2 Very x    4 Extremely x    A Ax x c   11
  • 12.
    Aggregation Operations     1 21 21,,,           n aaa aaah n n    0 0, ,1iand a i i n        , min 1 , 0 , 1 , , max h h Harmonic Mean h Geometric Mean h Algebraic Mean h                         Generalized Mean: 12
  • 13.
    Aggregation Operations (2) •Fixed Norms (Drastic, Product, Min) • Parametric Norms (Yager) T-norms:   , 1 , , 1 0 , D b if a T a b a if b otherwise       Drastic Product    , min ,ZT a b a b ,T a b a b   Zadehian  ,BSS a b a b a b      , 0 , , 0 1 , D b if a S a b a if b otherwise       S-Norm Duals:    , max ,ZS a b a b Bounded Sum DrasticZadehian 13
  • 14.
    Aggregation Operations (3) Drastic T-Norm Product Zadehian min GeneralizedMean Zadehian max Bounded Sum Drastic S-Norm Algebraic (Mean) Geometric Harmonic b (=0.8)a (=0.3)        1 , min 1, 0,w w w u a b a b for w    Yager S-Norm Yager S-Norm for varying w 14
  • 15.
    Crisp Vs. Fuzzy FuzzySets • Membership values on [0,1] • Law of Excluded Middle and Non- Contradiction do not necessarily hold: • Fuzzy Membership Function • Flexibility in choosing the Intersection (T-Norm), Union (S- Norm) and Negation operations Crisp Sets • True/False {0,1} • Law of Excluded Middle and Non- Contradiction hold: • Crisp Membership Function • Intersection (AND) , Union (OR), and Negation (NOT) are fixed A A A A       A A A A       15
  • 16.
    Binary Gray Level Color (RGB,HSVetc.) Can we give a crisp definition to light blue? 16
  • 17.
    Fuzziness Vs. Vagueness Vagueness=InsufficientSpecificity “I will be back sometime” Fuzzy Vague “I will be back in a few minutes” Fuzzy Fuzziness=Unsharp Boundaries 17
  • 18.
    Fuzziness “As the complexityof a system increases, our ability to make precise and yet significant statements about its behavior diminishes” – L. Zadeh • A possible definition of fuzziness of an image:  2 min ,ij ij i j Fuzz M N      18
  • 19.
    Example: Finding anImage Threshold Membership Value Gray Level     1 , , 1 smf a x c f x a c e    19
  • 20.
    Fuzzy Inference (Expert)Systems Service Time Fuzzy IF-THEN Rules Tip Level Food Quality Ambiance Fuzzify: Apply MF on input Generalized Modus Ponens with specified aggregation operations Defuzzify: Method of Centroid, Maximum, ... 20
  • 21.
    Examples of FuzzyVariables: Distance between formants (Large/Small) Formant location (High/Mid/Low) Formant length (Long/Average/Short) Zero crossings (Many/Few) Formant movement (Descending/Ascending/Fixed) VOT= Voice Onset Time (Long/Short) Phoneme duration (Long/Average/Short) Pitch frequency (High/Low/Undetermined) Blob (F1/F2/F3/F4/None) “Don’t ask me to carry…" 21
  • 22.
  • 23.
    Suggested Fuzzy InferenceSystem Feature Vector from Spectrogram Identify Phoneme Class using Fuzzy IF-THEN Rules Vowels Find Vowel Fricatives Nasals Output Fuzzy MF for each Phoneme 23 Assign a Fuzzy Value for each Phoneme, Output Highest N Values to a Linguistic model
  • 24.
    Summary 24 • Fuzzy Logiccan be useful in solving Human related tasks • Evidence Theory gives tools to handle knowledge • Membership functions and Aggregation methods can be selected according to the problem at hand Some things we didn’t talk about: • Fuzzy C-Means (FCM) clustering algorithm • Dempster-Schafer theory of combining evidence • Fuzzy Relation Equations (FRE) • Compositions • Fuzzy Entropy
  • 25.
    References [1] G. J.Klir ,U. S. Clair, B. Yuan“Fuzzy Set Theory: Foundations and Applications “, Prentice Hall PTR 1997, ISBN: 978-0133410587 [2] H.R. Tizhoosh;“Fast fuzzy edge detection” Fuzzy Information Processing Society, Annual Meeting of the North American, pp. 239 – 242, 27-29 June 2002. [3] A.K. Hocaoglu; P.D. Gader; “ An interpretation of discrete Choquet integrals in morphological image processing Fuzzy Systems “, Fuzzy Systems, FUZZ '03. Vol. 2, 25-28, pp. 1291 – 1295, May 2003. [4] E.R. Daugherty, “An introduction to Morphological Image Processing”, SPlE Optical Engineering Press, Bellingham, Wash., 1992. [5] A. Dumitras, G. Moschytz, “Understanding Fuzzy Logic – An interview with Lofti Zadeh”, IEEE Signal Processing Magazine, May 2007 [6] J.M. Yang; J.H. Kim, ”A multisensor decision fusion strategy using fuzzy measure theory ”, Intelligent Control, Proceedings of the 1995 IEEE International Symposium on, pp. 157 – 162, Aug. 1995 [7] R. Steinberg, D. O’Shaugnessy ,”Segmentation of a Speech Spectrogram using Mathematical Morphology ” ,To be presented at ICASSP 2008. [8] J.C. Bezdek, J. Keller, R. Krisnapuram, N.R. Pal, ” Fuzzy Models and Algorithms for Pattern Recognition and Image Processing ” Springer 2005, ISBN: 0-387-245 15-4 [9] W. Siler, J.J. Buckley,“Fuzzy Expert Systems and Fuzzy Reasoning“, John Wiley & Sons, 2005, Online ISBN: 9780471698500 [10] http://pami.uwaterloo.ca/tizhoosh/fip.htm [11] "Heavy-tailed distribution." Wikipedia, The Free Encyclopedia. 22 Jan 2008, 17:43 UTC. Wikimedia Foundation, Inc. 3 Feb 2008 http://en.wikipedia.org/w/index.php?title=Heavy-tailed_distribution&oldid=186151469 [12] T.J. Ross, “Fuzzy Logic with Engineering Applications”, McGraw-Hill 1997. ISBN: 0070539170 25

Editor's Notes

  • #6 Linguistic Variables
  • #8 Following Bezdek
  • #14 Buckley: Experiment – ask many people if statement A, B, A AND B is true. Then check the prior correlation coefficient. The result shows which method to use. The assumption is that with a large population model, the TRUE/FALSE values converge to the probability that a person would say that the statement is true.
  • #15 Following the work of Klir