Você está na página 1de 40

FUZZY SETS

Precision vs. Relevancy

A 1500 Kg mass
is approaching
is approaching LOOK
your
your head
head
OUT!
OUT!!
atat45.3
45.3m/sec.
m/s.

31

1
Introduction
How to simplify very complex systems?
Allow some degree of uncertainty in their
description!
How to deal mathematically with uncertainty?
Using probabilistic theory (stochastic).
Using the theory of fuzzy sets (non-stochastic).
Proposed in 1965 by Lotfi Zadeh (Fuzzy Sets,
Information Control, 8, pp. 338-353).
Imprecision or vagueness in natural language does
not imply a loss of accuracy or meaningfulness!

32

Examples
Give travel directions in terms of city blocks OR in
meters?
The day is sunny OR the sky is covered by 5% of clouds?
If the sky is covered by 10% of clouds is still sunny?
And 25%?
And 50%?
Where to draw the line from sunny to not sunny?
Member and not member or membership degree?

33

2
Probability vs. Possibility
Event u: Hans ate X eggs for breakfast.
Probability distribution: PX(u)
Possibility distribution: X(u)

u 1 2 3 4 5 6 7 8

PX(u) 0.1 0.8 0.1 0 0 0 0 0

X(u) 1 1 1 1 0.8 0.6 0.4 0.2

34

Probability vs. Fuzzy Set Membership


You’re lost in the Outback; Dying of Thirst

You Come Upon Two Bottles Containing Liquid

Which One Will You Choose?


How Will You Process the Information?

35

3
Probability vs. Fuzzy Set Membership

Potable? Potable?
Probability Membership
= 0.91 = 0.91

OR Might Taste Funky,


but shouldn’t kill you
36

Applications of fuzzy sets


Fuzzy mathematics (measures, relations, topology,
etc.)
Fuzzy logic and AI (approximate reasoning, expert
systems, etc.)
Fuzzy systems
Fuzzy modeling
Fuzzy control, etc.
Fuzzy decision making
Multi-criteria optimization
Optimization techniques

37

4
Classical set theory

Set: collection of objects with a common property.


Examples:
Set of basic colors:
A = {red, green, blue}

Set of positive integers:


A {x | x 0}

A line in 3:

A = {(x,y,z) | ax + by + cz +d = 0}

38

Representation of sets

Enumeration of elements: A = {x1, x2,..., xn}


Definition by property P: A = {x X | P(x)}
Characteristic function A(x): X {0,1}

1, if x is member of A
A ( x)
0, if x is not member of A

Example:
Set of odd numbers: A ( x) x mod 2

39

5
Set operations
Intersection: C = A B
C contains elements that belong to A and B
Characteristic function: C = min( A , B) = A· B

Union: C = A B
C contains elements that belong to A or to B
Characteristic function: C = max( A , B)

Complement: C =
C contains elements that do not belong to A
Characteristic function: C = 1 – A

40

Fuzzy sets
Represent uncertain (vague, ambiguous, etc.)
knowledge in the form of propositions, rules, etc.
Propositions:
expensive cars,
cloudy sky,...
Rules (decisions):
Want to buy a big and new house for a low price.
If the temperature is low, then increase the heating.

41

6
Classical set
Example: set of old people A = {age | age 70}

1
A

0.5

0
50 60 70 80 90 100
age [years]
42

Logic propositions
“Nick is old” ... true or false
Nick’s age:
ageNick = 70, A(70) = 1 (true)
ageNick = 69.9, A(69.9) = 0 (false)

1
A

0.5

0
50 60 70 80 90 100
age [years] 43

7
Fuzzy set
Graded membership, element belongs to a set to a
certain degree.

1
A
membership grade
Membership grade

0.5

0
50 60 70 80 90 100
age [years]
44

Fuzzy proposition
“Nick is old”... degree of truth
ageNick = 70, A(70)= 0.5
ageNick = 69.9, A(69.9) = 0.49
ageNick = 90, A(90) =1

1
A
membership grade

0.5

0
50 60 70 80 90 100
age [years] 45

8
Context dependent

1
A
membership grade

0.5

0
170 180 190
h [cm]
tall in China tall in USA tall in NBA

46

Typical linguistic values

young middle age old


1
membership grade

0
20 40 60 80 100
age [years]

47

9
Support of a fuzzy set
supp(A) = {x X| A(x) > 0}

supp(A)
x
48

Core (nucleous, kernel)


core(A) = {x X| A(x) = 1}

x
core(A)
49

10
-cut of a fuzzy set
Crisp set: A = { x X| A(x) }
Strong -cut: A = { x X| A(x) > }

x
A
50

Resolution principle
Every fuzzy set A can be uniquely represented as a
collection of -level sets according to

A ( x) sup [ A ( x)]
[0,1]

Resolution principle implies that fuzzy set theory is a


generalization of classical set theory, and that its
results can be represented in terms of classical set
theory.

51

11
Resolution principle

1
A

0
x

52

Other properties
Height of a fuzzy set: hgt(A) = sup A(x), x X
Fuzzy set is normal(ized) when hgt(A) = 1.
A fuzzy set A is convex iff x,y X and [0,1]:
A( x + (1 – ) y) min( A(x), A(y))

A B

x
53

12
Other properties (2)
Fuzzy singleton: single point x X where A(x) = 1.
Fuzzy number: fuzzy set in that is normal and
convex.
Two fuzzy sets are equal (A = B) iff:
x X, A(x) = B(x)
A is a subset of B iff:
x X, A(x) B(x)

54

Non-convex fuzzy sets


Example: car insurance risk

lifetime
age [years]
55

13
Representation of fuzzy sets
Discrete Universe of Discourse:
Point-wise as a list of membership/element pairs:
A= A(x1)/x1+...+ A(xn)/xn = i A(xi)/xi
A = { A(x1)/x1,..., A(xn)/xn} = { A(xi)/xi | xi X}

As a list of -level/ -cut pairs:


A = { 1/A 1, ..., n/A n} = { i/A i | i [0,1]}

56

Representation of fuzzy sets


Continuous Universe of Discourse:
A= X A(x)/x

Analytical formula: 1
A ( x) , x
1 x2
Various possible notations:
A(x), A(x), A, a, etc.

57

14
Examples
Discrete universe
Fuzzy set A =“sensible number of children”.
number of children: X = {0, 1, 2, 3, 4, 5, 6}
A = 0.1/0 + 0.3/1 + 0.7/2 + 1/3 + 0.6/4 + 0.2/5 + 0.1/6

Fuzzy set C = “desirable city to live in”


X = {SF, Boston, LA} (discrete and non-ordered)
C = {(SF, 0.9), (Boston, 0.8), (LA, 0.6)}

58

Examples
Continuous universe
Fuzzy set B = “about 50 years old”
X= + (set of positive real numbers)
B = {(x, B(x)) |x X}
Membership Grades

1
B ( x) 4
x 50
1
10

Age

59

15
Complement of a fuzzy set
c: [0,1] [0,1]; A(x c( A(x))

Fundamental axioms
1. Boundary conditions - c behaves as the ordinary
complement
c(0) = 1; c(1) = 0
2. Monotonic non-increasing
a,b [0,1], if a < b, then c(a) c(b)

60

Complement of a fuzzy set


Other axioms:

c is a continuous function.
c is involutive, which means that
c(c(a)) = a, a [0,1]

61

16
Complement of a fuzzy set
Equilibrium point
c(a) = a = ec, a [0,1]

Each complement has at most one


equilibrium.
If c is a continuous fuzzy complement, it has
one equilibrium point.

62

Examples of fuzzy complements


Satisfying only fundamental axioms:
1, if a t
c( a )
Fuzzy complement of threshold type: t=0.3 0, if a t
1

0.8

0.6

0.4

0.2

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

63

17
Examples of fuzzy complements
Satisfying fundamental axioms and continuity:
Continuous fuzzy complement (non involutive) 1
c( a ) 1 cos a
1 2

0.8

0.6

0.4

0.2

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

64

Examples of fuzzy complements


Sugeno complement: 1 a
c (a ) , ] 1, ]
1 a
Sugeno fuzzy complement, lambda = -0.9, -0.5, 0, 2, 10
1

0.9

0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

65

18
Examples of fuzzy complement
Yager complement: 1w
cw ( a ) 1 aw , w ]0, ]
Yager fuzzy complement, w = 0.2, 0.5, 1, 2, 10
1

0.9

0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
66

Representation of complement
(x) = 1 – A(x)

1
A

x
67

19
Representation of complement
1
A
(x)
0.5
1- A
(x)
0
0 20 40 60 80 100
x
1
A
(x)
0.5 =-0.9
=10
0
0 20 40 60 80 100
x
1 A
(x)
w=0.2
0.5 w=5

0
0 20 40 60 80 100
x
68

Intersection of fuzzy sets


i: [0,1] [0,1] [0,1];
A B(x i( A(x), B(x))

Fundamental axioms: triangular norm or t-norm


1. Boundary conditions - i behaves as the classical
intersection
i(1,1) = 1;
i(0,1) = i(1,0) = i(0,0) = 0
2. Commutativity
i(a,b) = i(b,a)

69

20
Intersection of fuzzy sets
3. Monotonicity
If a a’ and b b’, then i(a,b) i(a’,b’)
4. Associativity
i(i(a,b),c) = i(a,i(b,c))

Other axioms:
i is a continuous function.
i(a,a) = a (idempotent).

70

Examples of fuzzy conjunctions


Zadeh
A B(x) = min( A(x), B(x))

Probabilistic
A B(x) = A(x) B(x)

Lukaziewicz
A B(x) = max(0, A(x) B(x) 1)

71

21
Intersection of fuzzy sets

A B(x) = min( A(x), B(x))

A B

x
72

Intersection of fuzzy sets

1
A
B
0.8
min(A,B)
A*B
0.6 max(0,A+B-1)

0.4

0.2

0
0 20 40 60 80 100
x
73

22
Yager t-norm
Example of week and strong intersections:
w w 1w
iw ( a, b) 1 min 1, 1 a 1 b , w ]0, ]
Yager fuzzy intersection, w = 1.5, 2, 5

0.8

0.6

0.4

0.2

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

74

Union of fuzzy sets


u: [0,1] [0,1] [0,1];
A B(x u( A(x), B(x))

Fundamental axioms: triangular co-norm or s-norm


1. Boundary conditions - u behaves as the classical
union
u(0,0) = 0;
u(0,1) = u(1,0) = u(1,1) = 1
2. Commutativity
u(a,b) = u(b,a)

75

23
Union of fuzzy sets
3. Monotonicity
If a a’ and b b’, then u(a,b) u(a’,b’)
4. Associativity
u(u(a,b),c) = u(a,u(b,c))

Other axioms:
u is a continuous function.
u(a,a) = a (idempotent).

76

Examples of fuzzy disjunctions


Zadeh
A B(x) = max( A(x), B(x))
Probabilistic
A B(x) = A(x) B(x) A(x) B(x)

Lukasiewicz
A B(x) = min(1, A(x) B(x))

77

24
Union of fuzzy sets
A B(x) = max( A(x), B(x))

A B

x
78

Union of fuzzy sets

1
A
B
0.8 max(A,B)
A+B-A*B
0.6 min(1,A+B)

0.4

0.2

0
0 20 40 60 80 100
x
79

25
Yager s-norm
Example of week and strong disjunctions:

1w
uw ( a, b) min 1, a w b w , w ]0, ]
Yager fuzzy union, w = 2.5, 5, 10

0.8

0.6

0.4

0.2

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

80

General aggregation operations


h: [0,1]n [0,1];
A(x h( A1(x),..., An(x))
Axioms
1. Boundary conditions
h(0,...,0) = 0
h(1,...,1) = 1
2. Monotonic non-decreasing
For any pair ai, bi [0,1], i
If ai bi then h(ai) h(bi)

81

26
General aggregation operations
Other axioms:
h is a continuous function.
h is a symmetric function in all its arguments:
h(ai) = h(ap(i))
for any permutation p on

82

Averaging operations
When all the four axioms hold:

min( a1 , , an ) h(a1 , , an ) max(a1 , , an )

Operator covering this range: Generalized mean

1
a1 an
h (a1 , , an )
n

83

27
Generalized mean
Typical cases:
Lower bound:
h min(a1 , , an )
Geometric mean:
h0 (a1 a2 an ) n

Harmonic mean: n
h1
1 1
a1 an

Arithmetic mean: a1 an
h1
Upper bound: n
h max(a1 , , an )

84

Fuzzy aggregation operations

Parametric t-norms Parametric s-norms

Generalized mean

i min min max u max

Intersection operators Averaging operators Union operators

85

28
Membership functions (MF)

Triangular MF: x a c x
Tr ( x; a, b, c) max min , ,0
b a c b

Trapezoidal MF: x a d x
Tp ( x; a, b, c, d ) max min ,1, ,0
b a d c
2

Gaussian MF:
1 x c
2
Gs ( x; a, b, c) e

Generalized bell MF: 1


Bell ( x; a, b, c ) 2a
x c
1
b

86

Membership functions
(a) Triangular MF (b) Trapezoidal MF

1 1

0.5 0.5

0 0
0 20 40 60 80 100 0 20 40 60 80 100
(c) Gaussian MF (d) Generalized Bell MF

1 1

0.5 0.5

0 0
0 20 40 60 80 100 0 20 40 60 80 100
87

29
Left-right MF

c x
FL ,x c
LR ( x; c, , )
x c
FR ,x c
Membership Grades

Membership Grades
1 1
c = 65 0.8 c = 25 0.8
= 60 0.6 = 10 0.6
= 10 0.4 = 40 0.4
0.2 0.2
0 0
0 50 100 0 50 100

88

Two-dimensional fuzzy sets

A A ( x, y ) A ( x, y ) ( x , y ) X Y
X Y

x y

89

30
2-D membership functions
(a) z = m in(trap(x ), trap(y )) (b) z = m ax (trap(x ), trap(y ))

1 1

0.5 0.5

0 0
10 10
10 10
0 0 0 0
Y -10 -10 X Y -10 -10 X
(c ) z = m in(bell(x ), bell(y )) (d) z = m ax (bell(x ), bell(y ))

1 1

0.5 0.5

0 0
10 10
10 10
0 0 0 0
Y -10 -10 X Y -10 -10 X

90

Compound fuzzy propositions


Small = Short and Light (conjunction)

Small ( h, w) Short ( h) Light ( w)


Weight(w)
HEAVY

Compact Big
LIGHT

Small Thin

Height(h)

LONG

91

31
Cylindrical extension
Cylindrical extension of fuzzy set A in X into Y results
in a two-dimensional fuzzy set in X Y, given by

cext y ( A) A ( x ) /( x, y ) A ( x ) ( x, y ) ( x, y ) X Y
X Y

(a) Base Fuzzy Set A (b) Cylindrical Extension of A


1
1
0.5
0.5
0

0
X y X
92

Projection

(a) A Two-dimensional MF (b) Projection onto X (c) Projection onto Y

1 1 1

0.5 0.5 0.5

0 0 0

Y X Y X Y X

( x, y ) A ( x) max R ( x, y ) B ( y ) max R ( x, y )
R y x

93

32
Cartesian product
Cartesian product of fuzzy sets A and B is a fuzzy set in
the product space X Y with membership

A B ( x, y ) min( A ( x), B ( y ))
Cartesian co-product of fuzzy sets A and B is a fuzzy
set in the product space X Y with membership

A B ( x, y ) max( A ( x), B ( y ))

94

Cartesian product

(a) trap(x) (b) trap(y)


1 1
(X)

(Y)

0.5 0.5

0 0
-10 0 10 -10 0 10
X Y
(c) z = min(trap(x), trap(y)) (d) z = max(trap(x), trap(y))

1 1
0.5 0.5
0 0
10 10 10 10
0 0 0 0
Y -10 -10 X Y -10 -10 X

95

33
Classical relations
Classical relation R(X1, X2,..., Xn) is a subset of the
Cartesian product:

R X1, X 2 , , Xn X1 X 2 Xn
Characteristic function:

1, iff x1 , x2 , , xn R
R x1 , x2 , , xn
0, otherwise

96

Example
X = {English, French}
Y = {dollar, pound, euro}
Z = {USA, France, Canada, Britain, Germany}
R(X, Y, Z) = {(English, dollar, USA),
(French, euro, France), (English, dollar,Canada),
(French, dollar, Canada), (English, pound,Britain)}

97

34
Matrix representation

USA Fra Can Brit Ger USA Fra Can Brit Ger
Dollar 1 0 1 0 0 Dollar 0 0 1 0 0
Pound 0 0 0 1 0 Pound 0 0 0 0 0
Euro 0 0 0 0 0 Euro 0 1 0 0 0
English French

98

Fuzzy relation
Fuzzy relation:
R: X1 X2 ... Xn [0,1]
Each tuple (x1, x2,..., xn) has a degree of membership.
Fuzzy relation can be represented by an n-dimensional
membership function (continuous space) or a matrix
(discrete space).
Examples:
x is close to y
x and y are similar
x and y are related (dependent)

99

35
Discrete examples
Relation R “very far” between X = {New York, Lisbon}
and Y = {New York, Beijing, London}:
R(x,y) = 0/(NY,NY) + 1/(NY,Beijing) +
0.6/(NY,London) + 0.5/(Lisbon,NY) +
0.8/(Lisbon,Beijing) + 0.1/(Lisbon,London)
Relation: “is an important trade partner of”

Holland Germany USA Japan


Holland 1 0,9 0,5 0,2
Germany 0,3 1 0,4 0,2
USA 0,3 0,4 1 0,7
Japan 0,6 0,8 0,9 1

100

Continuous example
R: x y (“x is approximately equal to y”)

( x y )2
( x, y ) e

0.5

0
1
0.5
0 1
0.5
-0.5 0
-0.5
y -1 -1
x
101

36
Composition of relations
R(X,Z) = P(X,Y) Q(Y,Z)

Conditions:
(x,z) R iff exists y Y such that
(x,y) P and (y,z) Q.

Max-min composition

P Q ( x, z) max min P ( x, y ), Q ( y, z )
y Y

102

Properties
Associativity:
R ( S T ) ( R S) T
Distributivity over union:
R ( S T ) ( R S) (R T )
Weak distributivity over intersection:
R ( S T ) ( R S) ( R T )
Monotonicity:
S T ( R S) (R T )

103

37
Other compositions
Max-prod composition

P Q ( x, z) max P ( x, y ) Q ( y, z)
y Y

Max-t composition

P Q ( x, z) max t P ( x, y ), Q ( y, z )
y Y

104

Example

Y
a Z
0.7
0.5
0.6
b 1 0.8 1
1 1
c 0.4 0.9
2
0.3
d Q
P

105

38
Example
Composition R = P Q
x z R(x,z)

a 1 0.6
a 2 0.7
b 1 0.6
b 2 0.8
c 2 1
d 2 0.4

Composition R = P Q?

106

Matrix notation examples

0.3 0.5 0.8 0.9 0.5 0.7 0.7 0.8 0.3 0.5 0.5
0 0.7 1 0.3 0.2 0 0.9 1 0.2 0.5 0.7
0.4 0.6 0.5 1 0 0.5 0.5 0.5 0.4 0.5 0.6

0.3 0.5 0.8 0.9 0.5 0.7 0.7 0.8 0.15 0.4 0.45
0 0.7 1 0.3 0.2 0 0.9 1 0.14 0.5 0.63
0.4 0.6 0.5 1 0 0.5 0.5 0.5 0.2 0.28 0.54

107

39
Relations on the same universe
Let R be a relation defined on U U, then it is called:
Reflexive, if u U, the pair (u,u) R
Anti-reflexive, if u U, (u,u) R
Symmetric, if u,v U, if (u,v) R, then (v,u) R
too
Anti-symmetric, if u,v U, if (u,v) and (v,u) R,
then u = v
Transitive, if u,v,w U , if (u,v) and (v,w) R, then
(u,w) R too.

108

Examples
R is an equivalence relation if it is reflexive, symmetric
and transitive.
R is a partial order relation if it is reflexive, anti-
symmetric and transitive.
R is a total order relation if R is a partial order
relation, and u, v U, either (u,v) or (v,u) R.
Examples:
The subset relation on sets ( ) is a partial order
relation.
The relation on is a total order relation.

109

40

Você também pode gostar