32
Fuzzy Sets Jan Jantzen www.inference.dk 2013 A set is a collection of objects A special kind of set

Fuzzy Fuzzy Sets Jan Jantzen 2013 A set is a collection of objects A special kind of set

Embed Size (px)

Citation preview

Page 1: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

Fuzzy Sets

Jan Jantzen

www.inference.dk

2013

A set is a collection of objects

A special kind of set

Page 2: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

2

Summary: A set ...This object is not a member of the set

This object is a member of the set

A classical set has a sharp boundary

Page 3: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

3

... and a fuzzy set

A fuzzy set has a graded boundary

This object is not a member of the set

This object is a member of the set to a degree, for instance 0.8. The membership is between 0 and 1.

Page 4: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

4

Example: High and low pressures

Page 5: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

5

Example: "Find books from around 1980"

This could include 1978, 1979, 1980, 1981, and 1982

Page 6: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

6

Maybe even 41 or 42 could be all right?

Page 7: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

7

Example: A fuzzy washing machine

• If you fill it with only a few clothes, it will use shorter time and thus save electricity and water.

Samsung J1045AV capacity 7 kg

There is a computer inside that makes decisions depending on how full the machine is and other information from sensors.

Page 8: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

8

A rule (implication)

• IF the machine is full THEN wash long time

Condition Action.

The internal computer is able to execute an if—then rule even when the condition is only partially fulfilled.

Page 9: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

9

IF the machine is full …

• Example: Load = 3.5 kg clothes

true

false

Three examples of functions that define ‘full’. The horizontal axis is the weight of the clothes, and the vertical axis is the degree of truth of the statement ‘the machine is full’.

Classical set

Linear fuzzy set

Nonlinear fuzzy set

Page 10: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

10

… THEN wash long time

• long time could be t = 120 minutes

The duration depends on the washing program that the user selects.

Page 11: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

11

Decision Making (inference)

• Rule. IF the machine is full THEN wash long time• Measurement. Load = 3.5 kg • Conclusion. Full(Load) × t = 0.5 × 120 = 60 mins

)(

)(

00

0

xfy

xx

xfy

Analogy

The dots mean 'therefore'

The machine is only half full, so it washes half the time.

Page 12: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

12

A rule base with four rules

1. IF machine is full AND clothes are dirty THEN wash long time

2. IF machine is full AND clothes are not dirty THEN wash medium time

3. IF machine is not full AND clothes are dirty THEN wash medium time

4. IF machine is not full AND clothes are not dirty THEN wash short time

There are two inputs that are combined with a logical 'and'.

Page 13: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

13

THEORY OF FUZZY SETS

Page 14: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

14

Lotfi Zadeh’s Challenge

Clearly, the “class of all real numbers which are much greater than 1,” or “the class of beautiful women,” or “the class of tall men,” do not constitute classes or sets in the usual mathematical sense of these terms (Zadeh 1965).

Page 15: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

15

Sets

}3,2,1{}3|{ zZz

{Live dinosaurs in British Museum} =

}2,1,0{}2,1,1,0{

The set of

The set of positive integers

belonging tofor which

The empty set

Page 16: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

16

Fuzzy Sets

}1|)(,{ xxx

{nice days}

{adults}

Membership function

Much greater than

Page 17: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

17

Tall Persons

150 160 170 180 190 2000

0.2

0.4

0.6

0.8

1

Height [cm]

Mem

bers

hip

fuzzy

crisp

Universe

Degree of membership

Membership function

Page 18: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

18

Fuzzy (http://www.m-w.com)

adjective

Synonyms: faint, bleary, dim, ill-defined, indistinct, obscure, shadowy, unclear, undefined, vague

Unfortunately, they all carry a negative connotation.

Page 19: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

19

'Around noon'Trapezoidal

Triangular

Smooth versions of the same sets.

Page 20: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

20

The 4 Seasons

0

0.5

1

Time of the year

Mem

bers

hip

Spring Summer Autumn Winter

we are here

Seasons have overlap; the transition is fuzzy.

Page 21: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

21

Summary

A set A fuzzy set

Page 22: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

22

OPERATIONS ON FUZZY SETS

Page 23: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

23

Set Operations

BA BA BA

Classical

Fuzzy

Union Intersection Negation

Page 24: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

24

Fuzzy Set Operations

)(),(max xx BA

)(),(min xx BA

)(),(max1 xx BA

A B

x

)(xB

)(xA

Union

Intersection

Negation

Page 25: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

25

Example: Age

Primary term Primary term

The square of Young

The square root of Old

The negation of 'very young'

Page 26: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

26

Operations

)(),(max)(

)(),(min)(

)(1)(

)()(

)()(

)()(

)()(

3/1

3

2/1

2

xxx

xxx

xx

xx

xx

xx

xx

BABorA

BABandA

AAnot

AAslightly

AAextremely

AAmorl

AAvery

Here is a whole vocabulary of seven words.

Each operates on a membership function and returns a membership function. They can be combined serially, one after the other, and the result will be a membership function.

Page 27: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

27

Cartesian ProductThe AND composition of all possible combinations of memberships from A and B

The curves correspond to a cut by a horizontal plane at different levels

Page 28: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

28

Example: Donald Duck's family

• Suppose,– nephew Huey resembles nephew Dewey– nephew Huey resembles nephew Louie– nephew Dewey resembles uncle Donald– nephew Louie resembles uncle Donald

• Question: How much does Huey resemble Donald?

Page 29: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

29

Solution: Fuzzy Composition of Relations

Dewey Louie

Huey

De

we

y Lou

ie

=

Donald

Huey

Donald

0.8 0.9

0.5

0.6

Huey Dewey DonaldHuey Louie Donald

CompositionRelation

Relation

Relation

0.8 0.5

0.9 0.6

?

?

?

Page 30: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

30

If—Then Rules

1. If x is Neg then y is Neg2. If x is Pos then y is Pos

xy

Rule 2

Rule 1

approximately equal

Page 31: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

31

Key Concepts

• Universe• Membership function• Fuzzy variables• Set operations• Fuzzy relations • All of the above are parallels to classical

set theory

Page 32: Fuzzy Fuzzy Sets Jan Jantzen  2013 A set is a collection of objects A special kind of set

32

Application examples

• Database and WWW searches• Matching of buyers and sellers• Rule bases in expert systems