You are on page 1of 25

Fuzzy If

Then Rule

Dr. Djamel CSE 513 Soft Computing, Ch. 3: Fuzzy


Bouchaffra rules & fuzzy reasoning 1
Fuzzy if-then rules
Linguistic Variables

– Conventional techniques for system analysis are intrinsically


unsuited for dealing with systems based on human judgment,
perception & emotion

– Principle of incompatibility

• As the complexity of a system increases, our ability to make


precise & yet significant statements about its behavior
decreases until a fixed threshold

• Beyond this threshold, precision & significance become


almost mutually exclusive characteristics [Zadeh, 1973]

Dr. Djamel Bouchaffra CSE 513 Soft Computing, Ch. 3: Fuzzy rules & fuzzy reasoning
2
Fuzzy if-then rules

The concept of linguistic variables introduced by Zadeh


is an alternative approach to modeling human thinking

Information is expressed in terms of fuzzy sets instead


of crisp numbers

Definition: A linguistic variable is a quintuple


(x, T(x), X, G, M) where:

• x is the name of the variable


• T(x) is the set of linguistic values (or terms)
• X is the universe of discourse
• G is a syntactic rule that generates the linguistic values
• M is a semantic rule which provides meanings for the linguistic values

Dr. Djamel Bouchaffra 3


– Example:

A numerical variable takes numerical values


Age = 65

A linguistic variables takes linguistic values

Fuzzy if- Age is old

A linguistic value is a fuzzy set


then rules
All linguistic values form a term set
(3.3) (cont.)
T(age) = {young, not young, very young, ...
middle aged, not middle aged, ...
old, not old, very old, more or
less old, ...
not very yound and not very
old, ...}

4
5

Fuzzy if-then rules (3.3) (cont.)

• Where each term T(age) is characterized by a fuzzy set of a


universe of discourse X= = [0,100]

Dr. Djamel Bouchaffra CSE 513 Soft Computing, Ch. 3: Fuzzy rules & fuzzy reasoning
6

Fuzzy if-then rules (3.3) (cont.)

– The syntactic rule refers to the way the terms in


T(age) are generated

– The semantic rule defines the membership


function of each linguistic value of the term set

– The term set consists of primary terms as (young,


middle aged, old) modified by the negation (“not”)
and/or the hedges (very, more or less, quite,
extremely,…) and linked by connectives such as
(and, or, either, neither,…)

Dr. Djamel Bouchaffra CSE 513 Soft Computing, Ch. 3: Fuzzy rules & fuzzy reasoning
7

Fuzzy if-then rules


– Concentration & dilation of linguistic values

• Let A be a linguistic value described by a fuzzy set with


membership function A(.)
A k =  [ A ( x)]k / x

X

is a modified version of the original linguistic value.

– A2 = CON(A) is called the concentration operation

– A = DIL(A) is called the dilation operation

– CON(A) & DIL(A) are useful in expression the hedges such as


“very” & “more or less” in the linguistic term A

– Other definitions for linguistic hedges are also possible


8

Fuzzy if-then rules (3.3) (cont.)


– Composite linguistic terms

Let’s define:
NOT( A ) = A =  [1 −  A ( x )] / x,
X

A and B = A  B =  [ A ( x )   B ( x )] / x
X

A or B = A  B =  [ A ( x )   B ( x)] / x
X
where A, B are two linguistic values whose
semantics are respectively defined by A(.) & B(.)

Composite linguistic terms such as: “not very


young”, “not very old” & “young but not too young”
can be easily characterized
9

Fuzzy if-then rules (3.3) (cont.)


– Example: Construction of MFs for composite
linguistic terms

1
Let’s  young ( x ) = bell( x,20,2,0) = 4
 x
1+  
 20 
1
 old ( x) = bell( x,30,3,100) = 6
 x − 100 
1+  
 30 

Where x is the age of a person in the universe of discourse


[0, 100]
1
• More or less = DIL(old) = old =  6
/x
 x − 100 
X
1+  
 30 
10

Fuzzy if-then rules (3.3) (cont.)


• Not young and not old = young  old =
   
   
1 1
 1 −   1 −
4 
/x
6
 x  x − 100 
 1+     1+ 
X
 
    
20  30  
• Young but not too young = young  young2 (too = very) =
    
2

     
 1   1 −  1  
 4   4 
/x
 x  x
1 +      1 +    
x
  20      20   
• Extremely old  very very very old = CON (CON(CON(old))) =
8
 
 
1
  x − 100 6  / x
 
1 + 
x
 
Dr. Djamel Bouchaffra   30  
11
12

Fuzzy if-then rules (3.3) (cont.)


– Contrast intensification

the operation of contrast intensification on a


linguistic value A is defined by

2A 2 if 0   A ( x)  0.5
INT( A ) = 
2(A ) 2 if 0.5   A ( x)  1

• INT increases the values of A(x) which are greater than


0.5 & decreases those which are less or equal that 0.5

• Contrast intensification has effect of reducing the


fuzziness of the linguistic value A
13
• General format:

• If x is A then y is B (where A & B are


linguistic values defined by fuzzy sets on
universes of discourse X & Y).

• “x is A” is called the antecedent or


premise
• “y is B” is called the consequence or
Fuzzy if- conclusion

then rules • 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.

14
15

Fuzzy if-then rules (3.3) (cont.)


– Meaning of fuzzy if-then-rules (A  B)

• It is a relation between two variables x & y; therefore it is


a binary fuzzy relation R defined on X * Y

• There are two ways to interpret A  B:

– A coupled with B
– A entails B

if A is coupled with B then:


~
R = A  B = A*B =   A (x) *  B (y ) /( x, y )
X*Y
~
where * is a T - normoperator.
16

Fuzzy if-then rules (3.3) (cont.)

If A entails B then:

R = A  B =  A  B ( material implication)

R = A  B =  A  (A  B) (propositional calculus)

R = A  B = ( A   B)  B (extended propositional
calculus)
 ~ 
 R ( x, y ) = sup c;  A ( x) * c   B ( y ),0  c  1
 
17

Fuzzy if-then rules (3.3) (cont.)


Two ways to interpret “If x is A then y is B”:

A coupled with B A entails B


y y

B B

x x
A A
18

Fuzzy if-then rules (3.3) (cont.)

• Note that R can be viewed as a fuzzy set with a


two-dimensional MF

R(x, y) = f(A(x), B(y)) = f(a, b)

With a = A(x), b = B(y) and f called the fuzzy


implication function provides the membership
value of (x, y)

Dr. Djamel Bouchaffra CSE 513 Soft Computing, Ch. 3: Fuzzy rules & fuzzy reasoning
19

Fuzzy if-then rules (3.3) (cont.)


– Case of “A coupled with B”

Rm = A * B = 
X *Y
A ( x)   B ( y) /( x, y )

(minimum operator proposed by Mamdani, 1975)

Rp = A * B =   A (x)  B (y ) /( x, y )
X*Y
(product proposed by Larsen, 1980)

R bp = A * B =   A (x)   B (y ) /( x, y )
X*Y

=  0 ( A (x) +  B (y ) − 1) /( x, y )
X*Y

(bounded product operator)

Dr. Djamel Bouchaffra CSE 513 Soft Computing, Ch. 3: Fuzzy rules & fuzzy reasoning
20

Fuzzy if-then rules (3.3) (cont.)

– Case of “A coupled with B” (cont.)


Rdp = A * B = 
X *Y
A ( x) .̂  B ( y ) /( x, y )

a if b = 1

where : f(a, b) = a .̂ b = b if a = 1
0 if otherwise

Example for  A ( x) = bell ( x;4,3,10) and  B ( y ) = bell ( y;4,3,10)

(Drastic operator)

Dr. Djamel Bouchaffra CSE 513 Soft Computing, Ch. 3: Fuzzy rules & fuzzy reasoning
21

Fuzzy if-then rules (3.3) (cont.)

A coupled with B

Dr. Djamel Bouchaffra CSE 513 Soft Computing, Ch. 3: Fuzzy rules & fuzzy reasoning
22

Fuzzy if-then rules (3.3) (cont.)


– Case of “A entails B”

R a = A  B =  1  (1 −  A (x) +  B (y ) /( x, y )
X*Y
where : f a (a, b ) = 1  (1 − a + b )
(Zadeh’s arithmetic rule by using bounded sum operator for union)

R mm = A  ( A  B) =  (1 −  A (x))  ( A (x)   B (y )) /( x, y )
X*Y
where : f m (a, b ) = (1 − a)  (a  b )

(Zadeh’s max-min rule)

Dr. Djamel Bouchaffra CSE 513 Soft Computing, Ch. 3: Fuzzy rules & fuzzy reasoning
23

Fuzzy if-then rules (3.3) (cont.)

– Case of “A entails B” (cont.)

R s = A  B =  (1 −  A (x))   B (y ) /( x, y )
X*Y
where : f s (a, b ) = (1 − a)  b
(Boolean fuzzy implication with max for union)


R = (  ( x ) ~  ( y )) /( x, y )

A B
X*Y

~ 1 if a  b
where : a  b = 
b / a otherwise
(Goguen’s fuzzy implication with algebraic product for
T-norm)
Dr. Djamel Bouchaffra CSE 513 Soft Computing, Ch. 3: Fuzzy rules & fuzzy reasoning
24

A entails B
Dr. Djamel Bouchaffra CSE 513 Soft Computing, Ch. 3: Fuzzy rules & fuzzy reasoning
Dr. Djamel Bouchaffra 25

Thank
You

CSE 513 Soft Computing, Ch. 3: Fuzzy rules & fuzzy reasoning

You might also like