Fuzzy Sets and Fuzzification: Prof. Dr. Allaeldin H. Kassam
Fuzzy Sets and Fuzzification: Prof. Dr. Allaeldin H. Kassam
Fuzzy Sets and Fuzzification: Prof. Dr. Allaeldin H. Kassam
Fuzzification
Where:
• is the output MF
• is the inferred MF
• v is the value being fuzzified
• z is the degree of support
Tipping Example
• Assume
o service is poor
score of 2
o food is delicious
score of 8
• How do we perform fuzzy inference with
these values?
Tipping Example
• Firstly, fuzzify the input values
• Service fuzzifies to
o Poor 0.8
o Good 0.2
o Excellent 0.0
• Food fuzzifies to
o Rancid 0.0
o Good 0.4
o Delicious 0.6
Tipping Example
• Now, calculate the degree of support for each
rule
• Rule 1:
o IF service is poor or food is rancid
o poor = 0.8
o rancid = 0.0
o max(0.8, 0.0) = 0.8
o Degree of support = 0.8
• Rule 2
o IF service is good
o good = 0.2
o max(0.2) = 0.2
o Degree of support = 0.2
Tipping Example
• Rule 3
o IF service is excellent or food is delicious
o excellent = 0.0
o delicious = 0.6
o max(0.0, 0.6) = 0.6
o Degree of support = 0.6
Fuzzy Inference
• How are things different if we use product
inferencing?
Product Inference
Product Inference
• Corresponding set
o MF =
{(0,0),(1,0.16),(2,0.32),(3,0.48),(4,0.64),(5,0.8),(6,
0.64),(7,0.48),(8,0.16),(9,0.16),(10,0), (25,0)}
Product Inference
• Degree of support of 0.4
Product Inference
• Corresponding set
o MF =
{(0,0),(1,0.08),(2,0.16),(3,0.24),(4,0.32),(5,0.4),(6,
0.32),(7,0.24),(8,0.16),(9,0.08),(10,0), (25,0)}
Fuzzy Composition
• Aggregates the inferred MF into one
• Two methods of doing this
o Max
o Sum
• MAX takes the max fuzzy value for each value
of v
o equivalent to taking the fuzzy values for the highest
activated rule for each output fuzzy set
• SUM sums all fuzzy values for each value of v
o can lead to truth values > 1
o may need to be normalised to [0,1]
implications for defuzzification
Fuzzy Composition
• Assume
o 3 MF attached to the output
A, B and C
o Each MF has been asserted by two different rules
6 rules activated (degrees of support) > 0
o Degrees of support
0.8, 0.4, 0.6, 0.5, 0.7, 0.3
o Prod inference used
Fuzzy Composition
• For Set A
• For Set B
• For Set C
Max Composition
• MAX composition
o Take the max of each column
Max Composition
Sum Composition
• Sum composition
o sum each column
Sum Composition
Defuzzification
• Converts inferred MF into crisp numbers
• Many different types in existence
• Two common ones
o Centre of Gravity
o Mean of Maxima
COG Defuzzification
• Centre of Gravity
o CoG
• Where:
o y is the crisp value
o K is the number of items in the fuzzy set
COG Defuzzification
• Applying this to the first composite set
COG Defuzzification
COG Defuzzification
Defuzzification
• Mean of Maxima
o MoM
• Finds the mean of the crisp values that
correspond to the maximum fuzzy values
• If there is one maximum fuzzy value, the
corresponding crisp value will be taken from
the fuzzy set
MoM Defuzzification
• Applying this to the first composite set
• Maximum fuzzy value is 0.8
• Corresponding crisp value is 4
• This is the value returned by MoM
MoM Defuzzification
• What about sets with > 1 maximum?
• Apply this to the third composite set
MoM Defuzzification
• Maximum fuzzy value if 0.8
• Corresponding crisp values are
o 4, 5 and 6
MoM Defuzzification
Fuzzy Systems
Fuzzy Systems
• Three major components
o Fuzzy membership functions
o Fuzzy rules
o Fuzzy inference engine
• Membership Functions
o numerous types available
Gaussian, Triangular, Singleton, Trapezoidal
o each type has different parameters
e.g. centre, spread
o parameters effect the output of the function
Fuzzy Systems
• Fuzzy Rules
o map fuzzy facts to fuzzy conclusions
o different antecedent operators
• AND, OR, NOT
o consequents
• Zadeh-Mamdani
• Takagi-Sugeno
Fuzzy Systems
• Fuzzy inference engine
o final result depends on
inference
composition
Defuzzification
• Uncertainty
o rules can fire even if all antecedents don't match
o can deal with inexact concepts
smaller, faster etc.
o each rule corresponds to a wider range of input
values
Advantages of Fuzzy Systems
• Parallel execution of rules
o output calculated once at end of cycle
o rules are evaluated in parallel
o order does not matter
o no need for execution selection methods
• Compare to crisp rules
o order of rule execution can alter output of system
Disadvantages of Fuzzy Systems
• Computational cost
o more computations involved
fuzzification
fuzzy operators
composition of output fuzzy set
defuzzification
o complex MF can aggravate this problem
simple triangular vs.. S or Pi functions
• Defining the rules
o where do the rules come from?
o major problem with rule-based systems
o need to get enough rules to be accurate
o rules need to be expressive
comprehensibility
o rules need to be accurate
Disadvantages of Fuzzy Systems
• Optimisation
o a change in the MF can require a change in the
rules
o a change in the rules can require a change in the
MF
o each parameter / choice effects the others
o multi-parameter optimisation problem
• "Neural Network, Fuzzy Logic, and Genetic
Algorithms - Synthesis and Applications", by S.
Rajasekaran and G.A. Vijayalaksmi Pai, (2005),
Prentice Hall.
• "Soft Computing and Intelligent Systems Design
- Theory, Tools and Applications", by
Fakhreddine karray and Clarence de Silva
(2004), Addison Wesley.