1. Introduction to Machine
Learning
Lecture 19
Genetic Fuzzy Systems
Albert Orriols i Puig
http://www.albertorriols.net
htt // lb t i l t
aorriols@salle.url.edu
Artificial Intelligence – Machine Learning
g g
Enginyeria i Arquitectura La Salle
Universitat Ramon Llull
2. Recap of Lectures 5-18
Supervised learning
p g
Data classification
Labeled data
Build a model that
covers all the space
Unsupervised
Uns per ised learning
Clustering
Unlabeled data
Group similar objects
Association rule analysis
Unlabeled data
Get the most frequent/important associations
Slide 2
Artificial Intelligence Machine Learning
3. Today’s Agenda
Fuzzy Logics
Fuzzy Systems
Genetic Fuzzy Systems
Slide 3
Artificial Intelligence Machine Learning
4. Fuzzy Logics
Looking up in the dictionary…
gp y
Fuzzy = “not clear, distinct, or precise; blurred”
The
Th world is imprecise, not clear, blurred…
ld i i i tl bl d
The world is fuzzy!
Definition of fuzzy logics
yg
A form of knowledge representation suitable for notions that
cannot be defined precisely, but which depend upon their
p y, p p
contexts
Let’s go from true and false (traditional logics) to
something more powerful
Slide 4
Artificial Intelligence Machine Learning
5. Fuzzy Logics
Traditional logic representation
g p
Slow Fast
Logic rep
Slow speed = 0
Fast speed = 1
Slide 5
Artificial Intelligence Machine Learning
6. Fuzzy Logics
How fast is fast?
Definition of slow and fast depend on the eyes of the beholder
Natural language contains many subjective t
N t ll ti bj ti terms
How can I deal with this?
H d l ith thi ?
Fast Very fast
Very slow Slow
These four are linguistic terms
St ,
Still, I need to de e t e se a t cs o eac
eed define the semantics of each
linguistic term!
Slide 6
Artificial Intelligence Machine Learning
7. Fuzzy Logics
Classical view
Define intervals:
very slow [0 – 0.25]
slow [0.25 – 0.5]
fast [0.5 – 0.75]
very fast [0.75 – 1]
Fuzzy logics view
yg
Consider the degree with which each observation belongs to each
linguistic term
Define a membership function
Slide 7
Artificial Intelligence Machine Learning
8. Fuzzy Logics
Member ship functions
Semantics of the system
Fast Very fast
Very slow Slow
0 0.25 0.50 0.75 1
Slide 8
Artificial Intelligence Machine Learning
9. Fuzzy Logics
Many different membership functions. Some of them are
y p
1
c
ab d
Slide 9
Artificial Intelligence Machine Learning
10. Fuzzy Systems
Fuzzy systems
yy
are fundamental methodologies to represent and process
gu s c o a o
linguistic information
use fuzzy logic to either represent the knowledge or model the
interactions a d relationships a o g the sys e variables in
e ac o s and e a o s ps among e system a ab es
environments where there is uncertainty and imprecision.
E.g. of knowledge representation:
If john is tall and fast then strong
Genetic fuzzy systems
yy
The use of genetic/evolutionary algorithms (GAs) to design
fuzzy systems
yy
Slide 10
Artificial Intelligence Machine Learning
12. GFS
Two key elements:
y
Fuzzy system
In our case, we will focus on rule-based systems
case
Genetic algorithm
Fuzzy system
yy
Slide 12
Artificial Intelligence Machine Learning
13. Fuzzy Rule-Based Systems
Rule base
If size is small and weight is small then quality is bad
If size is small and weight i l
ii ll d i ht is large th quality i medium
then lit is di
If size is large and weight is small then quality is medium
If size is large and weight is large then quality is good
Data base
Slide 13
Artificial Intelligence Machine Learning
14. Fuzzy Rule-Based Systems
Operation of the inference system
Centre of
gravity
Slide 14
Artificial Intelligence Machine Learning
15. Fuzzy Rule-Based Systems
Great, I know how to infer… But who gives me
, g
The rules
The i f
Th information of the data base (the semantics)
ti f th d t b (th ti )
The inference engine
Inference system
Defuzzification methods
Use a genetic algorithm for this task
Slide 15
Artificial Intelligence Machine Learning
16. Recall GAs?
Population
Individual 1 Fit. 1
Individual 2 Fit. 2
Individual i
Population ... ...
Individual n Fit. n Individual j
Individual 1
Initialization
Individual 2 Individual 1
...
Individual n
Individual n
Individual i’
Individual i’’
Mutation Individual j’
Individual j’’
Individual
I di id l 1’
Individual 1’’
Individual n’
Individual n’’
Selection + Mutation: Continuous improvement and local search
Selection + Recombination: Innovation
Slide 16
Artificial Intelligence Machine Learning
17. Where Do we Use the GA?
Taxonomy of GFS (
y (Herrera, 2008)
, )
Slide 17
Artificial Intelligence Machine Learning
18. Where Do we Use the GA?
Taxonomy of GFS (
y (Herrera, 2008)
, )
Slide 18
Artificial Intelligence Machine Learning
19. Topics
We are going to see
g g
Genetic tuning
1.
Genetic rule learning
G ti ll i
2.
Genetic rule selection
3.
Genetic DB learning
4.
S u ta eous genetic ea
Simultaneous ge et c learning o KB co po e ts
g of components
5
5.
Genetic learning of KB components and inference engine
6.
pa a ete s
parameters
1st seen i thi l t
in this lecture. 2nd-5th seen i next l t
5 in t lecture
Information based on the paper Herrera (2009) and the
corresponding presentation
di t ti
Slide 19
Artificial Intelligence Machine Learning
20. 1. Genetic Tuning
Typically membership functions
yp y p
are defined by domain experts
are j t selected f
just l t d from general f
l forms: triangles, t
ti l trapezoids,
id
Gaussian…
But,
B t could we have better membership functions?
ld h b tt b hi f ti ?
Let a GA tune the membership functions
Also, tune the inference parameters
Slide 20
Artificial Intelligence Machine Learning
21. 1. Genetic Tuning
How do we
apply the GA?
So, we are modifying
the partitions of the
feature space
Slide 21
Artificial Intelligence Machine Learning
22. 1. Genetic Tuning
An example: Tuning triangular membership functions
p g g p
Each chromosome encodes a different DB definition
2 vars x 3 ling. labels = 6 mem. functions
g
Triangles 3 real values to code them
Chromosome length = 18 genes
Note that the RB remains unchanged!
Slide 22
Artificial Intelligence Machine Learning
23. Next Class
Next l
N t class
Genetic rule learning
1.
Genetic rule selection
2.
Genetic DB learning
3.
Simultaneous genetic learning of KB components
4.
Genetic learning of KB components and inference engine
G ti l i f t di f i
5.
parameters
Applications
Slide 23
Artificial Intelligence Machine Learning
24. Introduction to Machine
Learning
Lecture 19
Genetic Fuzzy Systems
Albert Orriols i Puig
http://www.albertorriols.net
htt // lb t i l t
aorriols@salle.url.edu
Artificial Intelligence – Machine Learning
g g
Enginyeria i Arquitectura La Salle
Universitat Ramon Llull