Professional Documents
Culture Documents
5 Reasoning in Uncertain Situation - V2
5 Reasoning in Uncertain Situation - V2
CHAPTER 5
REASONING IN UNCERTAIN
SITUATION
FUZZY LOGIC____________________________________________________ 8
FUZZY SETS ______________________________________________________________________ 8
HEDGES _______________________________________________________________________ 10
FUZZY INFERENCES ______________________________________________________________ 13
PRACTICE MAKES PERFECT __________________________________________________ 17
5:0
MODULE – LECTURE NOTES ITS462 UNCERTAINTY REASONING
Through most part of this module, inference procedures followed the model of reasoning used
in predicate calculus: from correct premises, sound inference rules produce new, guaranteed
correct conclusions. However there are many situations where does not fit this approach. This
is due to poorly formed and uncertain evidence using unsound inference rules.
In almost every aspect of our daily life, we draw useful conclusions from incomplete and
imprecise data successfully. Doctors deliver correct medical diagnoses and recommend
treatment from various ambiguous symptoms. People recognize other people from their voice
ot their gestures. All of these are example of uncertain situations.
The example below will demonstrate the problem of reasoning in ambiguous situation:
The usage of words like ‘high, moderate, fast, very fast’ shows that they are in uncertain
situation. There are several techniques can be used to reason in such situation. However, in
this module, two techniques should be discussed only Certainty Factor and Fuzzy Logic.
5:1
MODULE – LECTURE NOTES ITS462 UNCERTAINTY REASONING
CERTAINTY FACTOR
Certainty factors theory is a popular technique to reason in uncertainty. The basic principles
of this theory were first introduced in MYCIN, an expert system for the diagnosis and therapy
of blood infections and meningitis. The developers of MYCIN found that medical experts
expressed the strength of their belief in terms that were neither logical nor mathematical
consistent. In addition, there was no reliable statistical data about the problem domain.
There are several uncertain terms interpreted in certainty factors as shown in table 1.
The maximum value of certainty factors (cf) is +1.0 (definitely true and the minimum is -1.0
(definitely false). A positive value represented a degree of belief and a negative value
represented a degree of disbelief.
Measure of belief indicates the degree to which belief in hypothesis (H) would be
increased if evidence (E) were observed.
5:2
MODULE – LECTURE NOTES ITS462 UNCERTAINTY REASONING
Measure of disbelief indicates the degree to which disbelief in hypothesis (H) would be
increased if evidence (E) were observed.
Both measures range between 0 and 1. Combining both measures, to produce the certainty
factor, determine the total strength of belief or disbelief in a hypothesis. The certainty factor
is computed using the following equation:
MB(H,E) – MD(H,E)
cf =
1 – min [MB(H,E), MD(H,E)]
Thus, cf value will always range between +1 and -1, indicates the total belief in hypothesis H.
Usually, the focus is to find the net certainty of rule consequent when the evidence in the
rule antecedent is uncertain. This is shown as follows:
The net certainty for a single antecedent rule, cf(H,E), can be easily computed by multiplying
the certainty factor of the antecedent, cf(E), with the rule certainty factor, cf.
cf(H,E) = cf(E) x cf
For example,
5:3
MODULE – LECTURE NOTES ITS462 UNCERTAINTY REASONING
There are two possible cases for multiple antecedents rule: conjunctive rule and disjunctive
rule.
Conjunctive rule
The net certainty for a multiple antecedents rule, cf(H, E1 E2 E3 … En), can be
computed by as follows:
and given the current certainty factor of the evidences are as follows:
cf(sky is clear) = 0.9, cf(temperature is hot) = 0.8, cf(forecast is sunny) = 0.7
Find the cf for action is wear sunglasses.
Disjunctive rule
The net certainty for a multiple antecedents rule, cf(H,E1 E2 E3 … En), can be
computed by as follows:
and given the current certainty factor of the evidences are as follows:
5:4
MODULE – LECTURE NOTES ITS462 UNCERTAINTY REASONING
Sometimes, two or more rules can affect the same hypothesis. This occurs when the same
consequent is obtained as a result of the execution of two or more rules.
For example:
Rule 1 : IF A is X
THEN C is Z {cf 0.8}
Rule 2 : IF B is Y
THEN C is Z {cf 0.6}
In the given example above, both rules will fire the same consequences which is C is Z.
Therefore, the individual certainty factors obtained from each rule should be combined
together using the following equations:
cf1 + cf2 x ( 1 - cf1 ) If cf1 > 0 and cf2 > 0 (Both positive values)
cf1 + cf2 If cf1 > 0 or cf2 > 0 (One positive and one
cf(H,E) =
1 – min(|cf1| , |cf2|) negative value)
cf1 + cf2 x ( 1 + cf1 ) If cf1 < 0 and cf2 < 0 (Both negative values)
where:
cf1 is the confidence in hypothesis H established by Rule 1.
cf2 is the confidence in hypothesis H established by Rule 2.
|cf1| and |cf2| is the absolute magnitudes of cf1 and cf2, respectively.
5:5
MODULE – LECTURE NOTES ITS462 UNCERTAINTY REASONING
and given the current certainty factor of the evidences are as follows:
and given the current certainty factor of the evidences are as follows:
5:6
MODULE – LECTURE NOTES ITS462 UNCERTAINTY REASONING
= 0.72 + (-0.05)
1 - min[ |0.72| , |-0.05|]
= 0.67
1 - 0.05
= 0.705
and given the current certainty factor of the evidences are as follows:
5:7
MODULE – LECTURE NOTES ITS462 UNCERTAINTY REASONING
FUZZY LOGIC
Besides certainty factor, fuzzy logic is another way to reason in uncertain situation. Experts
usually rely on common sense when solving a problem. First order predicate calculus is a logic
in which an interpretation requires mapping symbols into sets in order to assign a truth value.
For example, you are an astronaut unless you are a member of the set that lists all
astronauts. This kind of logic is a crisp one – either an object is a member of a set or not.
Fuzzy logic is an idea of logic where involve partial set membership introduced by Lotfi Zadeh
during the 1960’s. The idea was to provide a reasoning mechanism that could use fuzzy
variables.
In fuzzy logic, linguistic variables are usually used to describe the variables and it always
being assigned with linguistic values. Sometimes, hedges are used to strengthen the values
assigned.
Fuzzy logic A branch of logic that uses degree of membership in sets rather than
a strict true/false value
Linguistic Term used in our natural language to describe some concepts that
variable usually has vague fuzzy values
Example:
FUZZY SETS
The concept of a set is fundamental to mathematics. For example, car indicates the set of
cars. When we say a car, means one out of the set of cars.
5:8
MODULE – LECTURE NOTES ITS462 UNCERTAINTY REASONING
However, in fuzzy logic, usually we express set more than classical set does. The question we
should ask is, ‘How tall is the man?’. And the answer could be ‘quite tall’, ‘very tall’, and
etc.
The following figure explains more about the differences between crisp and fuzzy set.
According to figure (a), if Halim’s height is 160 cm, he is not a tall man. However, if we
consider the fuzzy set in figure (b), Halim belong to ‘tall men’ set with degree of membership
0.2.
Fuzzy membership value is always calculated using the membership function as represented in
the graph.
1.0 1.0
0.8 0.8
Degree of membership
Degree of membership
0.6 0.6
0.4 0.4
0.2 0.2
0.0 0.0
150 155 160 165 170 175 180 185 150 155 160 165 170 175 180 185
Height, cm Height, cm
(a) Crisp set of ‘tall men’ (b) Fuzzy set of ‘tall men’
Fuzzy set can also be represented in the form of elements and degree of membership. Assume
we have a universe of discourse X and a fuzzy set A defined on it.
Fuzzy sets A defines the degree of membership, A (x) that maps elements xi of X to degree of
membership in [0,1].
Includes symbols “/” which associates the membership valus ai, to the element xi.
as follows:
5:9
MODULE – LECTURE NOTES ITS462 UNCERTAINTY REASONING
1.0
The same concept as classical set, several operations can be done onto the sets, such as
intersection, union and complementation.
INTERSECTION
In classical set theory, intersection of 2 sets contains elements that common to both.
In fuzzy sets, an element may be partially in both sets.
Example:
Medium Tall = { 0/160, 0.5/170, 0/180 }
(as shown in the shaded area in the graph) short medium tall
0.0
130 140 150 160 170 180 190 cm
5:10
MODULE – LECTURE NOTES ITS462 UNCERTAINTY REASONING
UNION
Example:
Medium Tall = { 0/140, 0.5/150, 1/160,
0.5/170, 1/180, 1/190 } short medium tall
(as shown in the shaded area in the graph)
0.0
130 140 150 160 170 180 190 cm
COMPLEMENTATION
1.0
A (x) = 1 - A(x)
Example:
Medium = { 1/140, 0.5/150, 0/160,
short medium tall
0.5/170, 1/180 }
(as shown in the shaded area in the graph)
0.0
130 140 150 160 170 180 190 cm
5:11
MODULE – LECTURE NOTES ITS462 UNCERTAINTY REASONING
HEDGES
More or less
A (x)
Somewhat
2[A (x)]2
if 0 A 0.5
Indeed
1 - 2[1 - A (x)]2
if 0.5 < A 1
5:12
MODULE – LECTURE NOTES ITS462 UNCERTAINTY REASONING
FUZZY INFERENCES
membership function
rules
Rule-base
0.0 0.0
-15 -10 -5 0 5 10 15 -15 -10 -5 0 5 10 15
(a) Fuzzy set for speed_errror (b) Fuzzy set for acceleration
5:13
MODULE – LECTURE NOTES ITS462 UNCERTAINTY REASONING
1.0
0.0
-15 -10 -5 0 5 10 15
(c) Fuzzy set for throttle
1. FUZZIFICATION
This stage involves the process of converting (fuzzifying) the crisp value to fuzzy value. For
example, refer to the figure below. Suppose that, from the reading on the sensors, the speed
error is 1 and the acceleration is 8.
1.0 1.0
0.85
0.8
0.2 0.25
0.0 0.0
-15 -10 -5 0 5 10 15 -15 -10 -5 0 5 10 15
From the given graph above, we know that speed_error = positive (1) = 0.2, speed_error = zero (1)
= 0.85, acceleration = negative (8) = 0.8, and acceleration = zero (8) = 0.25.
2. MATCHING RULES
During the inference process, the consequence part will get the membership value of the
antecedent.
5:14
MODULE – LECTURE NOTES ITS462 UNCERTAINTY REASONING
If there are more than one antecedents linked together with an AND operator, take the
minimum value.
If there are more than one antecedents linked together with an OR operator, take the
minimum value.
From all three rules fired, we can determine the degree to which the conclusion is supported.
Rule 1:
throttle = reduce small = 0.25
Rule 2:
throttle = reduce high = 0.8
Rule 3:
throttle = increase small = 0.0
5:15
MODULE – LECTURE NOTES ITS462 UNCERTAINTY REASONING
0.8
reduce
high
0.25
reduce
small
0.0
-15 -10 -5 0 5 10 15
5. DEFUZZIFICATION
Defuzzification is the last stage where the fuzzy output being converted (defuzzified) into
crisp value, which gives more meaning to the user. Center of Gravity (COG) can be used to
calculate this.
1.0
0.8
0.25
0
0.0
-25 -20 -15 -10 -5 0 5 10 15
COG = x . (x)
(x)
= -47.25
2.6
= -18.17
5:16
MODULE – LECTURE NOTES ITS462 UNCERTAINTY REASONING
5:17
MODULE – LECTURE NOTES ITS462 UNCERTAINTY REASONING
5:18
MODULE – LECTURE NOTES ITS462 UNCERTAINTY REASONING
5:19
MODULE – LECTURE NOTES ITS462 UNCERTAINTY REASONING
5:20
MODULE – LECTURE NOTES ITS462 UNCERTAINTY REASONING
6. Given the following rules, show the fuzzy inferences for all the rules and the
aggregation if temperature is 65 and pressure is 30.
IF temperature is high
THEN velocity is high
1.0 1.0
0.0 0.0
20 40 60 80 100 0 25 50 75 100
1.0
0.0
0 25 50 75 100
Show the inference processes and come out with the velocity.
5:21