4.4 Fuzzy Logic

Topic 4
Representation and Reasoning
with Uncertainty
Contents
4.0 Representing Uncertainty
4.1 Probabilistic methods
4.2 Certainty Factors (CFs)
4.3 Dempster-Shafer theory
4.4 Fuzzy Logic
4.4 Fuzzy Logic
Fuzzy membership of sets
•
The truth of a statement is not always clear-cut
•
“John is tall” – depends on the height of John (185cm),
but also on how we decide if someone is “tall”.
–
–
•
–
–
•
Some might say John is tall, others not.
Depends to a degree on the set of people he is being compared
with
Fuzzy Logic is concerned with degrees of membership
in vaguely defined sets.
If in 100% of cases, someone whose height is 200cm is classed
as tall, then a new individual who is 200cm tall has 1.0
membership in the set of tall people.
if in 50% of cases, someone whose height is 185cm is classed
as tall, then a new individual who is 185cm tall has 0.5
membership in the set of tall people.
(Although membership degrees not usually based on
real data, rather on subjective estimates).
1
4.4 Fuzzy Logic
Non-Fuzzy Set Membership
•
•
•
At 170cm, an individual not tall
At 184.9cm, an individual is not tall
At 185cm, an individual is tall
Tall
Not Tall
170cm
185cm 200cm
4.4 Fuzzy Logic
Fuzzy Set Membership
•
•
•
At 170cm, an individual has 0.0 membership in the set “tall”
At 185cm, an individual has 0.5 membership in the set “tall”
At 200cm, an individual has 1.0 membership in the set “tall”
Tall
Not Tall
170cm
185cm 200cm
2
4.4 Fuzzy Logic
Advantage of Fuzzy Set Membership
•
In automatic systems, a very small change in a sensor
should not produce a sudden drastic change in the
interpretation (e.g. car overheating)
Using fuzzy set membership, the response to sensor
readings can be conditioned by the degree of
membership in the danger set.
•
Overheating
Not overheating
70c
90c
100c
4.4 Fuzzy Logic
Fuzzy sets and Propositions
•
In classical logic, a proposition is equivalent to a
statement about set membership:
–
“john is tall”
-> “john”
“the set of tall people”
•
In fuzzy logic, a proposition is a statement about
membership in fuzzy sets.
•
The difference is, Fuzzy Logic allows degrees of of set
membership (a value between 0 and 1).
The degree of set membership indicates the
proposition’s degree of truth
•
3
4.4 Fuzzy Logic
Defining fuzzy sets:
• A fuzzy set can be defined by extension
(enumeration) or by intension (definition) :
4.4 Fuzzy Logic
Defining fuzzy sets:
–
Intension: use algebraic expression to compute
degrees of membership
4
4.4 Fuzzy Logic
Operations on Fuzzy Sets
4.4 Fuzzy Logic
Operations on Fuzzy Sets: Equality
•
2 fuzzy sets are equal if for any possible element of the
sets, the element has the same degree of membership
in both sets.
5
4.4 Fuzzy Logic
Operations on Fuzzy Sets: Subset
•
A fuzzy set A is a subset of fuzzy set B if for all
elements of A, the degree of membership in A is less
than in B.
4.4 Fuzzy Logic
Operations on Fuzzy Sets: Complement
•
2 fuzzy sets are complementary if for all elements of A,
the degree of membership in B is 1-A(s).
6
4.4 Fuzzy Logic
Operations on Fuzzy Sets: Union (A or B)
•
The union of two fuzzy sets will assign degree of
membership equal to the highest of the two sets.
4.4 Fuzzy Logic
Operations on Fuzzy Sets: Intersection (A and B)
•
The intersection of two fuzzy sets will assign degree of
membership equal to the lowest of the two sets.
7
4.4 Fuzzy Logic
Operations on Fuzzy Sets
•
•
•
What is the relationship between Tall and Model?
Between Tall and Giant?
Between Tall and Short?
4.4 Fuzzy Logic
Queries with Fuzzy Logic
John: 178cm
Mary 182cm
•
Is Luis tall or short?
•
To what degree is John tall?
•
Who is taller, John or Mary?
Luis: 184cm
8
4.4 Fuzzy Logic
Queries with Fuzzy Logic
John: 178cm
Mary 182cm
Luis: 184cm
•
Is Luis tall or short? Both: tall .82, short 0.18
•
To what degree is John tall? 0.5
•
Who is taller, John or Mary? The same: 0.5
4.4 Fuzzy Logic
Complex Queries with Fuzzy Logic
John: 178cm
Mary 182cm
Luis: 184cm
•
To what degree is Luis in the set : tall and medium ?
•
To what degree is Luis in the set not tall?
•
To what degree is John in the set small or medium?
9
4.4 Fuzzy Logic
Natural Language Modifiers in Fuzzy Logic
•
•
Statements such as “very tall”,
Fuzzy logic applies the following operations to
derive membership functions for these
modifiers:
–
–
–
Very p: truth degree =
More or less p: degree of truth:
Extremely p:
• If x ≥ 0.5:
•
if x < 0.5:
4.4 Fuzzy Logic
Natural Language Modifiers in Fuzzy Logic
–
–
More or less p:
Extremely p:
If x ≥ 0.5
If x < 0.5:
10