CIClass CH 08 CH 09
CIClass CH 08 CH 09
Fuzzy Systems
Implementations
Introduction
Need to consider:
•What will be evolved (what parts of the fuzzy system)
•How system elements are represented
•Population initialization
•Fitness evaluations
•Operators used
Representing Fuzzy Rules
Our system will use Mamdani-type fuzzy rules, for example:
Assuming each variable has three fuzzy sets, these two rules
can be numerically represented as:
FuzzyRule
FuzzyVariable Vector<int>
FuzzyMember
Genetic Operators
Usually use traditional operators for binary
representations.
0 if x x1
x x1
f right _ triangle if x1 x x2
x2 x1
1 if x x2
Fuzzy Membership Functions,
Cont’d.
0 if x x1
x x x2 x1
2 1
if x1 x
x2 x1 2
f triangle ( x)
2 x2 x if x2 x1 x x
2
x2 x1 2
0 if x x2
Fuzzy Membership Functions,
Cont’d.
0.5 y 2 8( x x1 )
f Gaussian ( x) e where y 4
x2 x1
1 12( x x1 )
f sigmoid ( x) where y
1 e ( y 6 ) x2 x1
Contents of iris.run:
iris.rul (rules file)
iris.dat (data file)
rules.out (output rules in text)
results.out (lists results) minimum
1 (averaging flag: 0=normal
1=average)
1 (defuzz param: 0, 1, 2)
0 (summation flag: 1=max, 0=sum)
(defuzz: 0 centroid with highest value used
1 no overlap method used
2 overlap of different mem fnctns used)
Defuzzification parameter: 0, 1, or 2
0: Centroid of membership function with highest value is
used for defuzzified scalar output
1: “No-overlap” method of defuzzification used
2: Overlap of different membership functions used
413
0.637500 0.437500 0.175000 0.025000 0
0.875000 0.400000 0.587500 0.175000 1
0.787500 0.412500 0.750000 0.312500 2
…….and so on
4 is number of inputs
1 is number of outputs
3 is number of classes
The Rules File
Contains fuzzy rules and definitions for fuzzy membership
functions for input and output variables.
Format is:
No._of_rules
No._of_inputs No._of_outputs
Definitions of input fuzzy sets
Definition(s) of output fuzzy set(s)
First rule
Second rule
…
Last rule
Rules File, Cont’d.
Each rule has an integer entry for each input and output
variable
1
Sigmoi x , where x = – 6 at left limit, x = 6 at right limit
d 1 e
Six Membership Functions
Removing Rule Redundancy
Duplicate listings of rules can be eliminated (three cases of 1
3 1 1 1 can be reduced to 1, eliminating two rules).
The original 16 rules can thus be collapsed to 10 with the same results
21221
30333
10111
11223
21333
22332
32322
21222
22333
11222
Output Files
Rule output file rules_out contains a list of rules in words,
such as:
if_sepalLength_is_medium_and_sepalWidth_is_Low_and
_ …etc., which facilitates accuracy checking.
LVQ was used to cluster the Iris data, then centroids obtained
were
used to formulate fuzzy rules.
(No. of clusters in LVQ sets number of rules.)
Example:
if input_1 is low, input_2 is medium, and input_4 is high,
then output is very_high
is encoded as 2 3 0 4 5
Representation of Membership
Function Types, Shapes and
Ranges
For each membership function, represent the type (and
shape) as an integer from 1 to 6.
Chromosome example:
#rules, start_point1, end_point1, type1, … start_point15,
end_point15, type15, rule1, … , rule_maxno
The main run file has only two items, which are run files
for the GA and the fuzzy rule system:
ga.run
fl.run
Only four rules were needed to get 146 out of 150 correct.
(This is from the fitness value. We don’t know which ones are
wrong until we run classification.)
Computational Intelligence
Implementations
Fuzzy Evolutionary Fuzzy Rule
System
Implementation issues:
Which components to use
How to combine core components to best solve the
problem
Three input variables and two output variables are used, eight rules:
Practical issues
Strengths and Weaknesses