23
Fuzzy Logic (1) Intelligent System Course

Fuzzy Logic (1) Intelligent System Course. Apples, oranges or in between? A O Group of appleGroup of orange A A AA A A O O O O O O

Embed Size (px)

Citation preview

Page 1: Fuzzy Logic (1) Intelligent System Course. Apples, oranges or in between? A O Group of appleGroup of orange A A AA A A O O O O O O

Fuzzy Logic (1)

Intelligent System Course

Page 2: Fuzzy Logic (1) Intelligent System Course. Apples, oranges or in between? A O Group of appleGroup of orange A A AA A A O O O O O O

Apples, oranges or in between?

A O

Group of apple Group of orange

A

AAA

AA

O

OO

OO

O

Page 3: Fuzzy Logic (1) Intelligent System Course. Apples, oranges or in between? A O Group of appleGroup of orange A A AA A A O O O O O O

Lotfi Zadeh

Page 4: Fuzzy Logic (1) Intelligent System Course. Apples, oranges or in between? A O Group of appleGroup of orange A A AA A A O O O O O O

Thinking in Fuzzy

A O

A

AA

A

AA

O

O

OOO

O

Fuzzy group of apples Fuzzy group of oranges

Page 5: Fuzzy Logic (1) Intelligent System Course. Apples, oranges or in between? A O Group of appleGroup of orange A A AA A A O O O O O O

Crisp vs Fuzzy

• Crisp sets handle only 0s and 1s

• Fuzzy sets handle all values between 0 and 1

CrispNo Yes

FuzzyNo Slightly Mostly Yes

Page 6: Fuzzy Logic (1) Intelligent System Course. Apples, oranges or in between? A O Group of appleGroup of orange A A AA A A O O O O O O

Fuzzy Set Notation

xxF F /

xxF F /

Continuous

Discrete

Page 7: Fuzzy Logic (1) Intelligent System Course. Apples, oranges or in between? A O Group of appleGroup of orange A A AA A A O O O O O O

Continuous Fuzzy Membership Function

2)2(

1)(

xxB

0 1 2 3 x

B(x)

• The set, B, of numbers near to two is

Page 8: Fuzzy Logic (1) Intelligent System Course. Apples, oranges or in between? A O Group of appleGroup of orange A A AA A A O O O O O O

Discrete Fuzzy Membership Function

The set, B, of numbers near to two is

5.3/03/2.0/75.2/3.05.2/4.0

2/15.1/4.025.1/3.01/2.05.0/0

B

0 1 2 3 x

B(x)

Page 9: Fuzzy Logic (1) Intelligent System Course. Apples, oranges or in between? A O Group of appleGroup of orange A A AA A A O O O O O O

Example

Example Fuzzy Sets to Aggregate...

A = { x | x is near an integer}

B = { x | x is close to 2}

0 1 2 3 x

A(x)

0 1 2 3 x

B(x)

1

Page 10: Fuzzy Logic (1) Intelligent System Course. Apples, oranges or in between? A O Group of appleGroup of orange A A AA A A O O O O O O

Fuzzy Union

)](),([max )( A xxx BBA

• Fuzzy Union (logic “or”)

Meets crisp boundary conditions

Commutative

Associative

Idempotent

Page 11: Fuzzy Logic (1) Intelligent System Course. Apples, oranges or in between? A O Group of appleGroup of orange A A AA A A O O O O O O

Fuzzy Union - example

A OR B = A+B ={ x | (x is near an integer) OR (x is close to 2)}

= MAX [A(x), B(x)]

0 1 2 3 x

A+B (x)

Page 12: Fuzzy Logic (1) Intelligent System Course. Apples, oranges or in between? A O Group of appleGroup of orange A A AA A A O O O O O O

Fuzzy Intersection

)](),([min )( A xxx BBA

• Fuzzy Intersection (logic “and”)

Meets crisp boundary conditions

Commutative

Associative

Idempotent

Page 13: Fuzzy Logic (1) Intelligent System Course. Apples, oranges or in between? A O Group of appleGroup of orange A A AA A A O O O O O O

Fuzzy Intersection - example

A AND B = A·B ={ x | (x is near an integer) AND (x is close to 2)}

= MIN [A(x), B(x)]

0 1 2 3 x

AB(x)

Page 14: Fuzzy Logic (1) Intelligent System Course. Apples, oranges or in between? A O Group of appleGroup of orange A A AA A A O O O O O O

Fuzzy ComplementThe complement of a fuzzy set has a membership function...

)(1)( xx AA

Meets crisp boundary conditions

Two Negatives Should Make a Positive

Law of Excluded Middle: NO!

Law of Contradiction: NO!

Page 15: Fuzzy Logic (1) Intelligent System Course. Apples, oranges or in between? A O Group of appleGroup of orange A A AA A A O O O O O O

Fuzzy Complement - example

0 1 2 3 x

1

)(xA

complement of A ={ x | x is not near an integer}

Page 16: Fuzzy Logic (1) Intelligent System Course. Apples, oranges or in between? A O Group of appleGroup of orange A A AA A A O O O O O O

Fuzzy Associativity (1)Min-Max fuzzy logic has intersection distributive over union...

)()( )()()( xx CABACBA

since

min[ A,max(B,C) ]=min[ max(A,B), max(A,C) ]

Page 17: Fuzzy Logic (1) Intelligent System Course. Apples, oranges or in between? A O Group of appleGroup of orange A A AA A A O O O O O O

Fuzzy Associativity (2)Min-Max fuzzy logic has union distributive over intersection...

)()( )()()( xx CABACBA

since

max[ A,min(B,C) ]= max[ min(A,B), min(A,C) ]

Page 18: Fuzzy Logic (1) Intelligent System Course. Apples, oranges or in between? A O Group of appleGroup of orange A A AA A A O O O O O O

Fuzzy and DeMorgan’s Law (1)

Min-Max fuzzy logic obeys DeMorgan’s Law #1...

since

1 - min(B,C)= max[ (1-B), (1-C)]

)()( xx CBCB

Page 19: Fuzzy Logic (1) Intelligent System Course. Apples, oranges or in between? A O Group of appleGroup of orange A A AA A A O O O O O O

Fuzzy and DeMorgan’s Law (2)

Min-Max fuzzy logic obeys DeMorgans Law #2...

since

1 - max(B,C)= min[(1-B), (1-C)]

)()( xx CBCB

Page 20: Fuzzy Logic (1) Intelligent System Course. Apples, oranges or in between? A O Group of appleGroup of orange A A AA A A O O O O O O

Fuzzy and Excluded Middle

Min-Max fuzzy logic fails The Law of Excluded Middle.

since

min( A,1- A) 0

Thus, (the set of numbers close to 2) AND (the set of numbers not close to 2) null set

AA

Page 21: Fuzzy Logic (1) Intelligent System Course. Apples, oranges or in between? A O Group of appleGroup of orange A A AA A A O O O O O O

Fuzzy and the Law of Contradiction

U AA

Min-Max fuzzy logic fails the The Law of Contradiction.

since

max( A,1- A) 1

Thus, (the set of numbers close to 2) OR (the set of numbers not close to 2) universal set

Page 22: Fuzzy Logic (1) Intelligent System Course. Apples, oranges or in between? A O Group of appleGroup of orange A A AA A A O O O O O O

Cartesian Product•The intersection and union operations can also be used to assign memberships on the Cartesian product of two sets.• Consider, as an example, the fuzzy membership of a set, G, of liquids that taste good and the set, LA, of cities close to Los Angeles

Juice Grape/9.0

JuiceRadish /5.0

WaterSwamp/0.0

G

London/9.0York New/8.0

Chicago/5.0LA/0.0

LA

Page 23: Fuzzy Logic (1) Intelligent System Course. Apples, oranges or in between? A O Group of appleGroup of orange A A AA A A O O O O O O

Cartesian Product

•We form the set...

E = G ·LA = liquids that taste good AND cities that

are close to LA

•The following table results... LosAngeles(0.0) Chicago (0.5) New York (0.8)

London(0.9)Swamp Water (0.0) 0.00 0.00 0.00 0.00Radish Juice (0.5) 0.00 0.50 0.50 0.50Grape Juice (0.9) 0.00 0.50 0.80 0.90