You are on page 1of 48

Fuzzy Rules and Fuzzy Reasoning

Dr. Elshimaa Elgendi


Operations Research and Decision Support
Faculty of computers and Information
Cairo University.
Fuzzy Systems Created By Experts
• There are two main sources for creating of
fuzzy systems – experts and data.
• key terms, such as linguistic variable, fuzzy
proposition, fuzzy inference, fuzzification, and
defuzzification.
Linguistic Variables
• The unique feature of fuzzy systems is their
ability to manipulate linguistic variables.
• A linguistic variable is the name of a fuzzy set
directly representing a specific region of the
membership function. For example, the
phrase “Slightly” in a fuzzy set of the linguistic
variable “a bowl of white cherries”.
Fuzzy Propositions
• The inference part of fuzzy systems is based on
fuzzy propositions. In general, this is a conditional
proposition with the general form,
If w is Z,
then x is Y
• Where w and x are model scalar values and Z and
Y are linguistic variables. The proposition
following the if term is the antecedent or
predicate and can be any fuzzy proposition. The
proposition following the then term is the
consequent and is also a fuzzy proposition.
Preamble
• The fuzzy set operators allow rudimentary
reasoning about facts.
• Example:
– consider the three fuzzy sets tall, good athlete and
good basketball player.

– If it is known that a good basketball player is tall and is


a good athlete, then which one of Peter or Carl will be
the better basketball player?
Fuzzification
• Fuzzy inference is a method that interprets the
input values and based on a set of rules
assigns values to the output.
• Fuzzification includes the process of finding
the membership value of a number in a fuzzy
set.
Defuzzification
• Aggregating two or more fuzzy output sets
yields a new final fuzzy output set, which is
converted into a crisp result by the deffuzifier.
• Defuzzification is the process of selecting a
single value from a fuzzy set.
Expert-based Fuzzy System
A Fuzzy Inference Systems Based On
Rule Discovery From Data
Benefits of Fuzzy Systems
Why fuzzy rules?
• Fuzzy rules and fuzzy reasoning are the backbone
of fuzzy inference systems
• Fuzzy inference systems are the most important
modeling tool in this field
• They have been successfully applied to many
applications such as
– automatic control
– expert systems
– pattern recognition
– data classification
– …
Outline
• Extension principle
• Fuzzy relations
• Fuzzy if-then rules
• Compositional rule of inference
• Fuzzy reasoning
Fuzzy Logic

• A nonmonotonic logical system that applies to


fuzzy variables.
• We use connectives defined as:
– A V B  MAX (A, B)
– A Λ B  MIN (A, B)
– ¬A  1 – A
• We can also define truth tables:

13
Extension Principle
• It provides general procedure for extending
crisp domains of mathematical expressions to
fuzzy domains
• it generalizes point-to-point mapping of a
function f(.) to a mapping between fuzzy sets
Extension Principle
A is a fuzzy set on X :

The image of A under f( ) is a fuzzy set B:

where yi = f(xi), i = 1 to n.

If f( ) is a many-to-one mapping, then


 B ( y )  max  A ( x )
1
x f ( y)
Extension Principle: Example 1
• Let
– A= 0.1/-2 + 0.4/-1+0.8/0+0.9/1+0.3/2
• and
– f(x)=x2-3 (-2)2-3
• Applying the extension principle we have
– B=0.1/1 +0.4/-2+0.8/-3+0.9/-2+0.3/1
– B=0.8/-3+(0.40.9)/-2+(0.1  0.3)/1
– B=0.8/-3+0.9/-2+0.3/1
Extension Principle: Example 2
Extension Principle: Example 3
Extension Principle: Example 3(2)
Fuzzy Relations
• A fuzzy relation R is a 2D MF:
R  {(( x, y ),  R ( x, y ))|( x, y )  X  Y}

• Examples:
– x is close to y (x and y are numbers)
– x depends on y (x and y are events)
– x and y look alike (x, and y are persons or objects)
– If x is large, then y is small (x is an observed
reading and Y is a corresponding action)
Max-Min Composition
• The max-min composition of two fuzzy relations R1 (defined
on X and Y) and R2 (defined on Y and Z) is

• Properties:
– Associativity: R ( S T )  ( R S ) T
– Distributivity over union:

– Week distributivity over intersection:

– Monotonicity: S  T  ( R S )  ( R T )
Example
Example 2
Max-Star Composition
• Max-product composition:
 R R ( x , z )  [ R ( x , y ) R ( y , z )]
1 2 1 2
y

• In general, we have max-* composition:


 R R ( x , z )  [ R ( x , y ) *  R ( y , z )]
1 2 1 2
y

• where * is a T-norm operator.


T- Norms:
T.1 T(0,0) = 0
T.2 T(a,b) = T(b,a) commutative
T.3 T(a,1) = a neuter
T.4 T(T(a,b),c)=T(a,T(b,c)) associative
T.5 T(c,d) <=T(a,b) if c<=a and d<=b monotonic
Fuzzy relation on a single set
• Representations of binary relations R(X,X):
Domain And Range Of Fuzzy Relation
Linguistic Variables
• A numerical variables takes numerical values:
Age = 65
• A linguistic variables takes linguistic values:
Age is old
• A linguistic values is a fuzzy set.
• All linguistic values form a term set:
T(age) = {young, not young, very young, ...
middle aged, not middle aged, ...
old, not old, very old, more or less old, ...
not very young and not very old, ...}
Hedges

• A hedge is a qualifier such as “very”, “quite”,


“somewhat” or “extremely”.
• When a hedge is applied to a fuzzy set it creates a
new fuzzy set.
• Mathematic functions are usually used to define the
effect of a hedge.
• For example, “Very” might be defined as:
– MVA (x) = (MA (x))2

31
Operations on Linguistic Values
Concentration (Very): CON ( A)  A2

Dilation (Somewhat): DIL( A)  A0.5


Contrast  2 A2 , 0   A ( x )  0.5
INT ( A)  
intensification:  2( A )2
, 0.5   A ( x )  1

intensif.m
Operations on Linguistic Values

Extremely ( A)  A 8
Linguistic Values (Terms)

complv.m
Fuzzy If-Then Rules
• General format:
If x is A then y is B
• Examples:
– If pressure is high, then volume is small.
– If the road is slippery, then driving is dangerous.
– If a tomato is red, then it is ripe.
– If the speed is high, then apply the brake a little.
Fuzzy If-Then Rules
Two ways to interpret “If x is A then y is B”:

A coupled with B (A and B) A entails B (not A or B)


y y

B B

x x
A A
Fuzzy If-Then Rules
• Fuzzy implication function:
 R ( x, y )  f (  A ( x ),  B ( y ))  f ( a, b)
A coupled with B

fuzimp.m
Fuzzy If-Then Rules
A entails B

fuzimp.m
Fuzzy Inference (1)

• Inference is harder to manage.


• Since:
A  B  ¬A V B
• Hence, we might define fuzzy inference
as:
A  B  MAX ((1 – A), B)
• This gives the unintuitive truth table
shown on the right.
• This gives us 0.5  0 = 0.5, where we
would expect
0.5  0 = 0

41
Compositional Rule of Inference
•Derivation of y = b from x = a and y = f(x):
y y

b b

y = f(x) y = f(x)

a x x
a
a and b: points
a and b: intervals
y = f(x) : a curve
y = f(x) : an interval-valued
function
Compositional Rule of Inference

• The extension principle is a special scale of the


compositional rule of inference .
 B ( y )  [  A ( x)   F ( x, y )]
x

• Conventionally, B is represented by

B  A F
Compositional Rule of Inference
• a is a fuzzy set and y = f(x) is a fuzzy relation:

cri.m
Fuzzy Reasoning
•Single rule with single antecedent
Rule: if x is A then y is B
Fact: x is A’
Conclusion: y is B’

•Graphic Representation:
A’ A B
w

X Y
A’
B’

X Y
x is A’ y is B’
Fuzzy Reasoning
•Single rule with multiple antecedent
Rule: if x is A and y is B then z is C
Fact: x is A’ and y is B’
Conclusion: z is C’
•Graphic Representation:
A’ A B’ B T-norm C2
w

Z
X Y
A’ B’
C’
Z
x is A’ X y is B’ Y z is C’
Fuzzy Reasoning
• Multiple rules with multiple antecedent
Rule 1: if x is A1 and y is B1 then z is C1
Rule 2: if x is A2 and y is B2 then z is C2
Fact: x is A’ and y is B’
Conclusion: z is C’
Aggregation Method is Sum or a
Aggregation
Method S-norm such as Max.

c' ( z )  Agg.(c ' ( z ), c ' ( z ))


1 2

• Graphic Representation: (next slide)


Fuzzy Reasoning
•Graphics representation:
A’ A1 B’ B1 C1
w1
Z
X Y
A’ A2 B’ B2 C2
w2

Z
X Y
T-norm
A’ B’
C’
Z
x is A’ X y is B’ Y z is C’

You might also like