Chapter 13 Fuzzy Logic 1. Handling Uncertainty Probability-based approach and Bayesian theory...
-
Upload
eustacia-ball -
Category
Documents
-
view
224 -
download
0
Transcript of Chapter 13 Fuzzy Logic 1. Handling Uncertainty Probability-based approach and Bayesian theory...
1
Chapter 13
Fuzzy Logic
2
Handling Uncertainty
• Probability-based approach and Bayesian theory• Certainty factor and evidential reasoning• Fuzzy logic
Advantages of Certainty Factors
• simple implementation
• reasonable modeling of human experts’ belief
– expression of belief and disbelief
• successful applications for certain problem classes
• evidence relatively easy to gather
– no statistical base required
Problems of Certainty Factors
• Partially ad hoc approach
– theoretical foundation through Dempster-Shafer (Evidence Theory, 1967-1976) theory was developed later
• New knowledge may require changes in the certainty factors of existing knowledge
• Certainty factors can become the opposite of conditional probabilities for certain cases
• Not suitable for long inference chains
• approach to a formal treatment of uncertainty
• a set of mathematical principles for knowledge representation based on degrees of membership.
• resembles human reasoning in its use of approximate information and uncertainty to generate decisions.
• relies on quantifying and reasoning through natural language
– based on the idea that all things involve degrees
– uses linguistic variables to describe concepts with vague values
• The motor is running really hot.
• Tom is a very tall guy.
Fuzzy Logic: Definition
6
Fuzzy Logic: Definition
(a) Boolean Logic. (b) Multi-valued Logic.0 1 10 0.2 0.4 0.6 0.8 100 1 10
• Unlike two-valued Boolean logic, fuzzy logic is multi-valued. It deals with degrees of membership and degrees of truth.
• Fuzzy logic uses the continuum of logical values between 0 (completely false) and 1 (completely true), accepting that things can be partly true and partly false at the same time.
7
Fuzzy Logic: Definition
• For instance, we may say, Tom is tall because his height is 181 cm. If we drew a line at 180 cm, we would find that David, who is 179 cm, is not tall.
• Isn’t David really a tall man or we have just drawn an arbitrary line in the sand?
membership
height (cm)00 50 100 150 200 250
0.5
1 short medium tall membership
height (cm)00 50 100 150 200 250
0.5
1short medium tall
8
Bit of History
• Fuzzy, or multi-valued logic, was introduced in the 1930s by Jan Lukasiewicz, a Polish philosopher. He introduced logic that extended the range of truth values to all real numbers in the interval between 0 and 1.
• For example, the possibility that a man 181 cm tall is really tall might be set to a value of 0.86. It is likely that the man is tall. This work led to an inexact reasoning technique often called possibility theory.
• In 1965, Lotfi Zadeh, published his famous paper “Fuzzy sets”. • Zadeh extended the possibility theory into a formal system of
mathematical logic, and introduced a new concept for applying natural language terms, called fuzzy logic.
9
Fuzzy vs. Probability
• Similarities:– Both represent degrees of certain kinds of subjective belief.
• Differences:– They address different forms of uncertainty (linguistic vs.
statistic)
– The probability refers to before an incident; while fuzzy deal with the uncertain values after happening the event.
– Note that probability can be defined for crisp concepts, too.
10
Fuzzy Applications
• Variety of fields:– taxonomy; topology; linguistics; logic; automata
theory; game theory; pattern recognition; medicine; law; decision support; Information retrieval; etc.
• recent fuzzy machines:– automatic train control; tunnel digging machinery;
washing machines; rice cookers; vacuum cleaners; air conditioners, etc.
11
Fuzzy ApplicationsAdvertisement: …• Extraklasse Washing Machine - 1200 rpm. The Extraklasse machine has a
number of features which will make life easier for you.• Foam detection
Too much foam is compensated by an additional rinse cycle: If Fuzzy Logic detects the formation of too much foam in the rinsing spin cycle, it simply activates an additional rinse cycle. Fantastic!
• Imbalance compensation In the event of imbalance, Fuzzy Logic immediately calculates the maximum possible speed, sets this speed and starts spinning. This provides optimum utilization of the spinning time at full speed […]
• Washing without wasting - with automatic water level adjustmentFuzzy automatic water level adjustment adapts water and energy consumption to the individual requirements of each wash programme, depending on the amount of laundry and type of fabric […]
12
Crisp vs. Fuzzy Sets
150 210170 180 190 200160
Height, cmDegree ofMembership
Tall Men
150 210180 190 200
1.0
0.0
0.2
0.4
0.6
0.8
160
Degree ofMembership
170
1.0
0.0
0.2
0.4
0.6
0.8
Height, cm
Fuzzy Sets
Crisp Sets
The fuzzy set of “tall men”: mapping height values into corresponding membership values
x-axis: universe of discourse
y-axis: membership value of the fuzzy set.
13
Crisp vs. Fuzzy Sets
Degree of Membership
Fuzzy
Mark
John
Tom
Bob
Bill
1
1
1
0
0
1.00
1.00
0.98
0.82
0.78
Peter
Steven
Mike
David
Chris
Crisp
1
0
0
0
0
0.24
0.15
0.06
0.01
0.00
Name Height, cm
205
198
181
167
155
152
158
172
179
208
• Categorization of elements into a set S• Described through a membership function m(s)
14
Crisp vs. Fuzzy Sets
• X: the universe of discourse (elements: x)
• Crisp set A of X, the characteristic function fA(x) :
fA(x) : X {0, 1}, where
• Mapping the universe X to a set of two elements:– 1 if x is an element of set A, and – 0 if x is not an element of A.
Ax
Axxf A if0,
if 1,)(
15
Crisp vs. Fuzzy Sets
• Fuzzy set A of universe X: the membership function µA(x)
µA(x) : X [0, 1], where µA(x) = 1 if x is totally in A;µA(x) = 0 if x is not in A;0 < µA(x) < 1 if x is partly in A.
• the degree to which x is an element of set A– called degree of membership, or membership value of
element x in set A.
16
Different notation for Membership Functions
• Usually a fuzzy set is denoted as:
A = A(xi)/xi + …………. + A(xn)/xn or
A = {A(xi)/xi , …………. , A(xn)/xn} or
A = {(A(xi),xi ), …………., (A(xn),xn)}
where A(xi)/xi is a pair “grade of membership” element, that belongs to a finite universe of discourse:
A = {x1, x2, .., xn}
17
Fuzzy Set Representation
• “tall men” example:– we can obtain fuzzy sets of tall, short and average men.
• The universe of discourse – the men’s heights– consists of three sets: short, average and tall men.
• Typical membership functions: sigmoid, gaussian and pi. • However, these functions increase the time of computation.• Therefore, in practice, most applications use linear fit functions.
• (see graphs on the next page)
18
Typical Membership Functions
19
Fuzzy Set Representation
150 210170 180 190 200160
Height, cmDegree ofMembership
Tall Men
150 210180 190 200
1.0
0.0
0.2
0.4
0.6
0.8
160
Degree ofMembership
Short Average ShortTall
170
1.0
0.0
0.2
0.4
0.6
0.8
Fuzzy Sets
Crisp Sets
Short Average
Tall
Tall
20
Fuzzy Set Representation
Fuzzy Subset A
Fuzziness
1
0Crisp Subset A Fuzziness x
X
(x)
21
Linguistic Variables and Hedges
• A linguistic variable is a fuzzy variable.
• For example, the statement “John is tall” implies that the linguistic variable John’s height takes the linguistic value tall.
• In fuzzy expert systems, linguistic variables are used in fuzzy rules.
IF wind is strongTHEN sailing is good
IF project_duration is longTHEN completion_risk is high
IF speed is slowTHEN stopping_distance is short
22
Linguistic Variables and Hedges
• For example, the universe of discourse of the linguistic variable speed:– 0 to 220 km/h – may include fuzzy subsets as very slow, slow, medium, fast, and very
fast.
• Hedges are terms that modify the shape of fuzzy sets, such as very, somewhat, quite, more or less and slightly.
23
Linguistic Variables and Hedges
Short
Very Tall
Short Tall
Degree ofMembership
150 210180 190 200
1.0
0.0
0.2
0.4
0.6
0.8
160 170
Height, cm
Average
TallVery Short Very Tall
24
Linguistic Variables and Hedges
Hedge MathematicalExpression
A little
Slightly
Very
Extremely
Hedge MathematicalExpression Graphical Representation
[A ( x )]1.3
[A ( x )]1.7
[A ( x )]2
[A ( x )]3
25
Linguistic Variables and Hedges
Hedge MathematicalExpressionHedge MathematicalExpression Graphical Representation
Very very
More or less
Indeed
Somewhat
2 [A ( x )]2
A ( x )
A ( x )
if 0 A 0.5
if 0.5 < A 1
1 2 [1 A ( x )]2
[A ( x )]4
26
Operations of Fuzzy Sets
27
Complement
• Crisp Sets: Who does not belong to the set?• Fuzzy Sets: How much do elements not belong to the set?
• If A is the fuzzy set, its complement A can be found as follows:A(x) = 1 A(x)
28
Containment (subset)
• Crisp Sets: Which sets belong to which other sets?• Fuzzy Sets: Which sets belong to other sets?
• Elements of the fuzzy subset have smaller memberships in it than in the larger set.
A is a fuzzy subset of B (A B), if A(x) B(x), xX
• e.g. Fuzzy “very tall men” is a subset of fuzzy “tall men”
29
Intersection
• Crisp Sets: Which element belongs to both sets?• Fuzzy Sets: How much of the element is in both sets?
• A fuzzy intersection is the lower membership in both sets of each element.
AB(x) = min [A(x), B(x)] = A(x) B(x),
30
Union
• Crisp Sets: Which element belongs to either set?• Fuzzy Sets: How much of the element is in either set?
• In fuzzy sets, the union is the reverse of the intersection. • The union is the largest membership value of the element in either set.
,
31
Operations of Fuzzy Sets
32
Logic operations in Fuzzy
• Boolean:
• Fuzzy
33
Logic operations in Fuzzy
34
Properties of Fuzzy Sets
is empty (null), IF AND ONLY IF: (x) = 0, xX)
35
Cardinality
• Cardinality of a non-fuzzy set, Z, is the number of elements in Z. • The cardinality of a fuzzy set A, the so-called SIGMA COUNT, is:
cardA = A(x1) + A(x2) + … A(xn) = ΣA(xi), for i = 1 … n
• Relative Cardinality of A is the cardinality of fuzzy set A divided by the total number of elements in the universal space of A.
Consider X = {1, 2, 3} and sets A and B
A = 0.3/1 + 0.5/2 + 1/3;
CardA = 1.8
RelativeCardA=0.6
36
Alpha-cut
• a list of all elements of fuzzy set A with membership grades greater than or equal to alpha is called the alpha-cut of A.
• An -cut or -level set of a fuzzy set A is:A={x|A(x), xX}.
Consider X = {1, 2, 3} and set A
A = 0.3/1 + 0.5/2 + 1/3
then A0.5 = {2,3}
A0.1 = {1,2,3}
A1 = {3}
37
Normal Fuzzy Set
• The height of a fuzzy subset A is the largest membership grade in Aheight(A) = max (A(x))
• A fuzzy set of X is called normal if there exists at least one element xX such that A(x) = 1.
• Or A fuzzy set with a height of 1 is called a normal fuzzy
• A fuzzy subset that is not normal is called subnormal.
• All crisp subsets (except for the null set) are normal.
38
Fuzzy Sets Core and Support
• the support of A is the crisp subset of X consisting of all elements with membership grade:
supp(A) = {x A(x) 0 and xX}
• the core of A is the crisp subset of X consisting of all elements with membership grade:
core(A) = {x A(x) = 1 and xX}
• If A = {1/a, 0.3/b, 0.2/c 0.8/d, 0/e}
supp(A) = {a, b, c, d }core(A) = {a}
39
Fuzzy Set Math Operations
• aA = {aA(x), xX}Let a =0.5, and
A = {0.5/a, 0.3/b, 0.2/c, 1/d}then
Aa = {0.25/a, 0.15/b, 0.1/c, 0.5/d}
• Aa = {A(x)a, xX}Let a =2, and
A = {0.5/a, 0.3/b, 0.2/c, 1/d}then
Aa = {0.25/a, 0.09/b, 0.04/c, 1/d}