Fuzzy logic

25
Fuzzy Logic and Fuzzy Set Theory

description

project relate the conversion of fuzzy language to natural languages...

Transcript of Fuzzy logic

Page 1: Fuzzy logic

Fuzzy Logic and Fuzzy Set Theory

Page 2: Fuzzy logic

2

Some Fuzzy Background

Lofti Zadeh has coined the term “Fuzzy Set” in 1965 and opened a new field of research and applicationsA 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?

Page 3: Fuzzy logic

3

Some Related Fields

Fuzzy Logic &

Fuzzy Set Theory

Evidence Theory

Pattern Recognition

& Image Processing

Control Theory

Knowledge Engineering

Page 4: Fuzzy logic

4

Overview

L. ZadehD. DuboisH. PradeJ.C. BezdekR.R. YagerM. SugenoE.H. MamdaniG.J. KlirJ.J. Buckley

Membership Functions

Linguistic Hedges

Aggregation Operations

Image Processing

Fuzzy Morphology

Fuzzy Measures Fuzzy

Integrals

Fuzzy Expert

Systems

Speech Spectrogram

Reading

Page 5: Fuzzy logic

5

A Crisp Definition of Fuzzy Logic

• Does not exist, however …- Fuzzifies bivalent Aristotelian (Crisp) logicIs “The sky are blue” True or False?

• Modus PonensIF <Antecedent == True> THEN <Do Consequent>IF (X is a prime number) THEN (Send TCP packet)• Generalized Modus PonensIF “a region is green and highly textured” AND “the region is somewhat below a sky region”THEN “the region contains trees with high confidence”

Page 6: Fuzzy logic

6

Fuzzy Inference (Expert) Systems

Input_1 Fuzzy IF-THEN

RulesOutputInput_2

Input_3

Page 7: Fuzzy logic

7

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???

Page 8: Fuzzy logic

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

Page 9: Fuzzy logic

9

Membership Function Examples

TrapezoidalTriangular

1

, ,1

smf a x cf x a c

e

Sigmoid

2

22; ,x c

gmff x c e

Gaussian

; , , , max min ,1 , ,0x a d x

f x a b c db a d c

; , , max min , , 0

x a c xf x a b c

b a c b

Page 10: Fuzzy logic

10

Alpha Cuts

AA x X x

AA x X x

Strong Alpha Cut

Alpha Cut0

0.2 0.5 0.8 1

Page 11: Fuzzy logic

11

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

2Very x

4Extremely x

A Ax x c

Page 12: Fuzzy logic

12

Aggregation Operations

1

2121 ,,,

n

aaaaaah nn

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:

Page 13: Fuzzy logic

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

Page 14: Fuzzy logic

14

Aggregation Operations (3)

DrasticT-Norm Product Zadehian

min

Generalized Mean

Zadehian max

BoundedSum

Drastic S-Norm

Algebraic (Mean)

Geometric

Harmonic

b (=0.8)a (=0.3)

1

, min 1 , 0,w w wu a b a b for w

Yager S-Norm

Yager S-Norm for varying w

Page 15: Fuzzy logic

15

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

Page 16: Fuzzy logic

16

BinaryGray LevelColor (RGB,HSV etc.)

Can we give a crisp definition to light blue?

Page 17: Fuzzy logic

17

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

Page 18: Fuzzy logic

18

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:

2min ,ij ij

i j

FuzzM N

Page 19: Fuzzy logic

19

Example: Finding an Image Threshold

Membership Value

Gray Level

1

, ,1

smf a x cf x a c

e

Page 20: Fuzzy logic

20

Fuzzy Inference (Expert) Systems

Service Time

Fuzzy IF-THEN

RulesTip Level

Food Quality

Ambiance

Fuzzify: Apply MF on

input

Generalized Modus Ponens with specified aggregation

operations

Defuzzify: Method of Centroid,

Maximum, ...

Page 21: Fuzzy logic

21

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…"

Page 22: Fuzzy logic

22

Applying the Segmentation Algorithm

Page 23: Fuzzy logic

23

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

Assign a Fuzzy Value for each Phoneme, Output Highest N Values to a

Linguistic model

Page 24: Fuzzy logic

24

Summary• 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

Page 25: Fuzzy logic

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