Você está na página 1de 10

Summary

Fuzzy Sets - Introduction  Classical Sets


 Classical Sets and Membership Functions
 Classical Sets Operations
Adriano Joaquim de Oliveira Cruz – NCE e IM, UFRJ  Classical Set Properties
adriano@nce.ufrj.br  Fuzzy Sets
 Membership Functions and Fuzzy Sets
If you only have a hammer, everything is
a nail.  Fuzzy Sets Terminology

@2001 Adriano Cruz NCE e IM - UFRJ Fuzzy Sets Introduction 2

Crips Sets Classical Sets


 Universe of Discourse  Membership Function
– It is the space where all set elements are – Defines whether a given element belongs
defined to a set
– For instance: 1 x ≥1.70
χ A (X) = 
• Human heights: 0 <= h <= 2.5m 0 x < 1.70
• room temperatures: -70o<=temp<=70o 1

0
1,70 altura
@2001 Adriano Cruz NCE e IM - UFRJ @2001 Adriano Cruz NCE e IM - UFRJ

Classical Sets/Problems Truth Tables


 Classical sets have problems when applied to a A B | A∪ B A∩ B A
wide class of real problems. 0 0 | 0 0 1
 The difficult problem of defining the frontier 0 1 | 1 0 1
between two sets (e.g. high/ not high) is called
1 0 | 1 0 0
Sorites Paradox, due to the dialectic Eubulides
from Miletus, opponent of Aristotle. 1 1 | 1 1 0
 The paradox is stated as follows: 1 → true
“Is one grain of sand a heap? Are two grains of sand a 0 → false
heap? ...”
Which mathematical functions could be used to
represent the union, intersection and
complement?
@2001 Adriano Cruz NCE e IM - UFRJ @2001 Adriano Cruz NCE e IM - UFRJ

1
Classical Sets Properties Classical Sets Properties

Involution A = A Idempotência A∪ A = A
Comutatividade A ∪ B = B ∪ A A∩ A = A
A∩ B = B ∩ A Identidade A∪∅ = A
Associatividade A ∪ ( B ∪ C ) = ( A ∪ B) ∪ C A∩∅ = ∅
A ∩ ( B ∩ C ) = ( A ∩ B) ∩ C A∪ X = X
Distributividade A ∪ (B ∩ C ) = ( A ∪ B) ∩ ( A ∪ C ) A∩ X = A
A ∩ (B ∪ C ) = ( A ∩ B) ∪ ( A ∩ C ) De Morgan A∩ B = A∪ B
A∪ B = A∩ B

@2001 Adriano Cruz NCE e IM - UFRJ @2001 Adriano Cruz NCE e IM - UFRJ

The Laws of Aristotle The Laws of Aristotle

 “Everything must be or not be, either in the  The intersection of a set and its complement
present or in the future.” is empty.
 The Union of a set to its complement yields
the Universe. A∩ A = ∅
A∪ A = X
 This is called the law of non-
non-contradiction.
contradiction

 This is called the law of the excluded middle.


middle

@2001 Adriano Cruz NCE e IM - UFRJ Fuzzy Sets Introduction 9 @2001 Adriano Cruz NCE e IM - UFRJ

Fuzzy Sets Fuzzy Sets - definition


 The membership function of elements in a  A fuzzy set can be represented by an
fuzzy set A is characterised by ordered set of pairs:
µ (.) : X → [0,1] Value
that maps every element from the set X into a
real number in the interval [0,1]. A = {( x, µ A ( x)) | x ∈ X }
1.0
Fuzzy Set Membership Universe of
0.5 function Discourse
0
1,70 1,80 altura
@2001 Adriano Cruz NCE e IM - UFRJ @2001 Adriano Cruz NCE e IM - UFRJ

2
Membership degree Membership
 Membership degree:
degree an element belongs to a  One element may belong partially to more
given set by a degree of certainty. than one set
 Some elements are more representative of – children={Pedro, Ana, Paulo, Marta}
the set main idea than others. – adolescents = {Pedro, Mateus, Joaquim}
– Excellent students={(Pedro,0.8), (Ana,0.9),
(Paulo,0.9), (Marta,1.0)} – children(Pedro)=0.2
– Very high = {(Oscar,0.95), (Michael – adolescents(Pedro)=0.8
Jordan, 0.95), (Junior Baiano,0.8)}

@2001 Adriano Cruz NCE e IM - UFRJ @2001 Adriano Cruz NCE e IM - UFRJ

It isn’t probability! It isn’t probability!


 Belonging to the set of high people with a  A bottle full of an unknown liquid has 95%
membership degree of 0.25 indicates probability of being pure poison.
separation from the ideal definition of high  Another full bottle of a very similar liquid
people by 0.75. belongs to the set of pure water to a degree
of 0.95, which means 5% poison.
 A degree value of 0.25 does not mean that a  This concentration of poison does not kill,
person this high may be found with however you will be very sick, may be a
probability 0.25 in the universe of people. doctor will be required.
 If you know which bottle to choose, you
understood the differences.
@2001 Adriano Cruz NCE e IM - UFRJ @2001 Adriano Cruz NCE e IM - UFRJ

Fuzzy Sets Representation 1 Fuzzy Sets Representation 2

 Ordered Pairs:
Pairs A fuzzy set may represented  Indicated as the union of all elements
by a set ordered pairs
 The first element is the element itself and the
second its membership degree in the set.
A = ∑ µ A ( xi ) / xi
xi∈A
 João = 1.65 m; Ana = 1.70 m; Oscar= 1.80 m
High = 0.25/João + 0.5/Ana + 1.0/Oscar
High = {(João, 0.25), (Ana,0.5), (Oscar,1.0)}

@2001 Adriano Cruz NCE e IM - UFRJ @2001 Adriano Cruz NCE e IM - UFRJ

3
Fuzzy Sets Representation 3 Example of Membership Functions

 Membership function:
function a fuzzy set may be
represented by a function that maps its elements
into real numbers in the interval [0,1].
µ(x)
1.0
0 altura ≤ 1.5
5 × altura − 7.5 Medium heights
 1.5 ≤ altura ≤ 1.7
µ media (altura) = 
− 5 × altura − 9.5 1.7 < altura < 1.9
0 altura ≥ 1.9
1.5 1.7 1.9 Heights

@2001 Adriano Cruz NCE e IM - UFRJ @2001 Adriano Cruz NCE e IM - UFRJ

Unimodal Functions Singletons


 A function is unimodal if
 A Function is a singleton whenever
∀x1 , x2 ∈ X , ∀λ ∈ [0,1] : µ (λx1 + (1 − λ ) x2 ) ≥ min[ µ ( x1 ), µ ( x2 )]
1 x = x
µ x ( x) = 
 An unimodal function implies that whenever 0 x ≠ x
µ(x)>µ(y) for a given set A then x is closer to the
ideal definition of A than y.
1

unimodal bimodal

@2001 Adriano Cruz NCE e IM - UFRJ @2001 Adriano Cruz NCE e IM - UFRJ

Classical Set Function Linear Functions


 Classical set functions are used to define  Very simple fuzzy set.
Classical sets.
µ(x) µ(x)
1

x1 x2 x
x1 x

@2001 Adriano Cruz NCE e IM - UFRJ @2001 Adriano Cruz NCE e IM - UFRJ

4
Triangular Functions Triangular Functions
 Easy to implement, allowing representation of
 May be generated from 3 real values.
very complex fuzzy sets.
 May be generated from 3 real values.
 0 x<a
( x − a ) /(b − a ) a ≤ x ≤ b
µ(x) 
tri ( x; a, b, c) = 
 (c − x) /(c − b) b ≤ x ≤ c
 0 x>c

a b c x

@2001 Adriano Cruz NCE e IM - UFRJ @2001 Adriano Cruz NCE e IM - UFRJ

Trapezoidal Functions Trapezoidal Functions


 Easy to implement, allowing representation of
 May be generated from 4 real values.
very complex fuzzy sets.
 May be generated from 4 real values.
 0 x<a
µ(x) x−a
b − a a≤x<b

trap ( x : a, b, c, d ) =  1 b≤x<c
d − x c≤x<d
d − c
 0 x≥d
x
a b c d
@2001 Adriano Cruz NCE e IM - UFRJ @2001 Adriano Cruz NCE e IM - UFRJ

Sigmoid Function Sigmoid Function


 It is described by two parameters: the inflexion
point (c), that is the point where the function is
equal to 0.5 and a parameter that defines the
shape.

Sig ( x; a, c) = 
1
−a ( x −c )
1 + e

@2001 Adriano Cruz NCE e IM - UFRJ @2001 Adriano Cruz NCE e IM - UFRJ

5
S Function S Function
 It is described by three parameters: its 0 degree
value (α), its 1 degree value (γ) and the inflexion
point (β), that is the point where the function is
1
equal to 0.5 (β=(α +γ)/2).
 0 x ≤α
  x −α 
2

 2×   α <x≤β
  γ −α 
S ( x, α , β , γ ) = 
1 − 2 ×  x − α  β < x ≤ γ
2

γ −α 
 0
 1 x>γ α β γ

@2001 Adriano Cruz NCE e IM - UFRJ @2001 Adriano Cruz NCE e IM - UFRJ

Beta Function Beta Function


 It is defined by two parameters, the value where
Beta−function
the function is equal to one (γ) and the inflexion 1
gamma = 5, beta = 3
(β). 0.9 gamma = 5, beta = 2
gamma = 5, beta = 1
0.8
gamma = 5, beta = 0.5

0.7

0.6
1
B ( x, γ , β ) = 0.5

 x −γ 
2
0.4
1+  
 β 
0.3

0.2

0.1

0
0 1 2 3 4 5 6 7 8 9 10

@2001 Adriano Cruz NCE e IM - UFRJ @2001 Adriano Cruz NCE e IM - UFRJ

Support of fuzzy sets Empty Fuzzy Set


 The support of a fuzzy set A, defined  A fuzzy set (A=Ø) is empty if its
in the universe of discourse X, is the membership function is zero
classical set defined as everywhere in its universe of discourse.

A = ∅ if µ A ( x) = 0, ∀x ∈ X
S A = {x ∈ X | µ A ( x) > 0}
 An empty fuzzy set has an empty
support

@2001 Adriano Cruz NCE e IM - UFRJ @2001 Adriano Cruz NCE e IM - UFRJ

6
Compact Support Alpha-Cuts Sets
 The support is compact when the set is smaller  The classical set Aα, called alpha-
alpha-cut set,
set is
than the size of the universe of discourse. the set of elements whose degree of
membership in A is no less than α. It is defined
If the support were not compact then several as:
Aα = {x ∈ X | µ A ( x) ≥ α }

rules would be activated at every input causing
an increase in the system load.

Non Compact Support Compact Support


 The classical set A’α is called strong alpha-
alpha-
cut set. It is defined as:
A = {x ∈ X | µ ( x ) > α }
'
α A
@2001 Adriano Cruz NCE e IM - UFRJ @2001 Adriano Cruz NCE e IM - UFRJ

Alpha-cut Set Example of Alpha-cuts

 Universe of Discourse (Ages):


{5,10,20,…
{5,10,20,…,80}

 Young = {(15,0), (17, 0.2), (19, 0.4), (21,0.6), (23,


0.8), (25,1.0), (27, 0.8), (29, 0.6), (31,0.4), (33, 0.2),
(35,0.0)}

 Young0.2 = {17, 19, 21, 23, 25, 27, 29, 31, 33}

 Young’0.2 = {19, 21, 23,, 25, 27, 29, 31}


31
@2001 Adriano Cruz NCE e IM - UFRJ @2001 Adriano Cruz NCE e IM - UFRJ

Alpha-cuts Level Set


 The set of all levels alpha that represent
distinct alpha-cuts of a given fuzzy set
A is called a level set of A.

Λ A = {α | µ A ( x) = α for some x ∈ X }
Ex.
Λ young = {0.2, 0.4 ,0.6, 0.8,1.0}
@2001 Adriano Cruz NCE e IM - UFRJ @2001 Adriano Cruz NCE e IM - UFRJ

7
Resolution Principle Cardinality
 The membership function of a fuzzy set  The cardinality |A| of a fuzzy set A is
A can be expressed in terms of its defined as
alpha cuts as (+ is union):
| A |= ∑ µ ( x )
Λ = {α 0 , α1 ,K,α n } x∈ X

A = α 0 × Aα 0 + α1 × Aα1 + L + α n × Aα n  The relative cardinality of A is defined


as
α if µ A ( x) ≥ α i
A
A =
µα × Aα =  i X
0 otherwise
0 0

@2001 Adriano Cruz NCE e IM - UFRJ @2001 Adriano Cruz NCE e IM - UFRJ

Cardinality - Example Cardinality - cont


Consider the set  When the fuzzy set is continuous the
A = {( 6 . 5 , 0 . 25 ), ( 7 , 0 . 5 ), ( 7 . 5 , 0 . 75 ), ( 8 ,1 ), cardinality is defined as
( 8 . 5 , 0 . 75 ), ( 9 , 0 . 5 ), ( 9 . 5 , 0 . 25 )}

defined in the universe of grades from 0 to 10 in A = ∫ µ A ( x)dx


0.5 steps. The cardinality of A is x
| A |= 0.25 + 0.5 + 0.75 + 1 + 0.75 + 0.5 + 0.25 = 4.0

So the relative cardinality of A is


4.0
A = = 0.2
21
@2001 Adriano Cruz NCE e IM - UFRJ @2001 Adriano Cruz NCE e IM - UFRJ

Fuzzy Cardinality Fuzzy Cardinality Example


 When a fuzzy set A has a finite support,  Young = Young = {(15,0), (17, 0.2), (19,
its fuzzy cardinality |Ã| is a fuzzy set 0.4), (21,0.6), (23, 0.8), (25,1.0), (27, 0.8),
(fuzzy number) defined on N whose (29, 0.6), (31,0.4), (33, 0.2), (35,0.0)}
membership function is defined by
µ| A~| (| Aα |) = α ∀α ∈ Λ A
µ| A~| (| Aα |) = α ∀α ∈ Λ A
| y oung |= 0.2 / 9 + 0.4 / 7 + 0.6 / 5 +
~
0 .8 / 3 + 1 .0 / 1

@2001 Adriano Cruz NCE e IM - UFRJ @2001 Adriano Cruz NCE e IM - UFRJ

8
Height of a fuzzy set Fuzzy Subsets
 The height of a fuzzy set is the highest  If the membership grade of each
membership value of its membership element of the fuzzy set A is less than
function or equal its membership grade in fuzzy
set B, then A is called a subset of B.
H A = max x∈X {µ A ( x)}
A ⊆ B if µ A ( x) ≤ µ B ( x ) ∀x ∈ X
 A fuzzy set is defined as normal when
HA=1 and subnormal when it is not.

@2001 Adriano Cruz NCE e IM - UFRJ @2001 Adriano Cruz NCE e IM - UFRJ

Equal Fuzzy Sets Distance


 If the membership grade of each  Measures the distance that a value is from the
ideal definition of the set. It is defined as
element of the fuzzy set A is equal its
membership grade in fuzzy set B, then  ∞ µ A ( x) = 0

A is equal to B. d ( A, x) =  1
− 1 µ A ( x) ≠ 0
 µ A ( x)
A = B if µ A ( x) = µ B ( x)
A = B if A ⊆ B and B ⊆ A

@2001 Adriano Cruz NCE e IM - UFRJ @2001 Adriano Cruz NCE e IM - UFRJ

Distance Examples of Fuzzy Sets

Distance d(A,x)
1

Set µA(x)

@2001 Adriano Cruz NCE e IM - UFRJ @2001 Adriano Cruz NCE e IM - UFRJ

9
Examples of Fuzzy Sets Examples of Fuzzy Sets

@2001 Adriano Cruz NCE e IM - UFRJ @2001 Adriano Cruz NCE e IM - UFRJ

Examples of Fuzzy Sets Examples of Fuzzy Sets

@2001 Adriano Cruz NCE e IM - UFRJ @2001 Adriano Cruz NCE e IM - UFRJ

10

Você também pode gostar