chapter 8 fuzzy inference 模糊推論
DESCRIPTION
Chapter 8 Fuzzy Inference 模糊推論. Fuzzy set and Fuzzy Logic why “Fuzzy Subset” ? Ordinary set -- the foundation of present day mathematics.(S) S : a set e 5 : an element But in real world , the relation is usually “fuzzy” ! John is 170 cm John : an element. S = {x|x is tall} - PowerPoint PPT PresentationTRANSCRIPT
Chapter 8
Fuzzy Inference
模糊推論
8. 模糊推論 G.J. Hwang 2
• Fuzzy set and Fuzzy Logic– why “Fuzzy Subset” ?
Ordinary set -- the foundation of present day mathematics.(S)
S : a set
e5 : an element
But in real world , the relation is usually “fuzzy” !John is 170 cm
John : an element
},,,{65325
eeeeSe
}|{ tallisxxor
8. 模糊推論 G.J. Hwang 3
S = {x|x is tall}
180cm 高的人 S ? Yes179cm 高的人 S ? Yes(179 和 180 只差 1cm)178cm 高的人 S ? Yes(178 和 179 只差 1cm)
•••
170cm 高的人 S ? Yes(170 和 171 只差 1cm)169cm 高的人 S ? Yes No (169 和 170 只差 1cm)
•••
120cm 高的人 S ? Yes(120 和 121 只差 1cm)
Why? 既然 170 是 ,為何 169 不是 ?
8. 模糊推論 G.J. Hwang 4
S ={x|x is tall}
假如找 100 個人投票 , 互相推選屬於 S 和不屬於 S的人 150cm 160cm 170cm 180cm
00
1
0.5
John is 180cm John S with degree 1.0
John is 165cm John S with degree 0.5
John is 150cm John S with degree 0
JohnS
8. 模糊推論 G.J. Hwang 5
• ordinary set is a particular case of the theory of fuzzy subset.
let E be a set and A be a subset of E
A E
Characteristic function (x)
x)= 1 if x A (yes)
x)= 0 if x A (no)
e.g. E={x1,x2,x3,x4,x5}
let A = {x2,x3,x5}
x1) = 0, x2 ) = 1, x3)= 1
x4) = 0, x5) = 1
8. 模糊推論 G.J. Hwang 6
A different representationA = {(x1,0),(x2,1),(x3,1),(x4,0),(x5,1)}
A A= 0
A A = E
IF x A , x A
(x)= 1, A(x)= 0
consider A ={x2,x3,x5}
A(x1) = 1, A(x2) = 0, A(x3) = 0
A(x4) = 1, A(x5) = 0
A = {(x1,1),(x2,0),(x3,0),(x4,1),(x5,0)}
8. 模糊推論 G.J. Hwang 7
Given two subsets A and B
(x)= 1, if x A
= 0, if x A
(x)= 1, if x B
= 0, if x
AB(x)= 1, if x A B
= 0, if x A B
AB(x)= (x) • (x)
01
0 1
0 00 1
Booleanproduct
8. 模糊推論 G.J. Hwang 8
Union
AB (x)= 1, if x A B
= 0, if x A B
AB (x)= (x) (x)
Booleansum
e.g. E = {x1,x2,x3,x4,x5}two subsets A and BA={x2,x3,x5}, B={x1,x3,x5}AB = {(x1,0 1),(x2,1 0), (x3,1 1),(x4,0 0),(x5,1 1)}
= {(x1,1),(x2,1),(x3,1),(x4,0),(x5,1)}
01
0 1
0 11 1
8. 模糊推論 G.J. Hwang 9
• The concept of Fuzzy Subset xi of E 或多或少 是 A 的元素
A = {(x1|0.2),(x2|0),(x3|0.3),(x4|1),(x5|0.8)}
Fuzzy Subset x1 屬於 A 的 程度 ( 可能由 0~1.0)
A E A is a Fuzzy Subset of E
x2A
A Ex1 , x2 , x3
0.2 0 0.3
membership
通常是主觀的認定 , 但至少表達了 Xis 之間的相對程度
8. 模糊推論 G.J. Hwang 10
• Zadehs definition of Fuzzy subset
Let E be a set, denumerable or not, let x be an element of E.
Then Fuzzy subset A of E is a set of ordered pairs {(x|(x)},
xE.
Where (x) : grade of membership of x in A
(x) takes its values in a set M (membership set)
x M
IF M={0,1}
fuzzy subset of A will be a nonfuzzy subset
(or ordinary set)
mapping
(x)
8. 模糊推論 G.J. Hwang 11
E.g.
Let N be the set of natural numbers
N = {0,1,2,3,4,5,6,...}
consider the fuzzy set A of smallnatural numbers
A = {(0/1),(1/0.8),(2/0.6),(3/0.4),(4/0.2),(5/0),(6/0),...}
用傳統的 ordinary set 很難表達
A = {(0,1),(1,1),(2,1),(3,1),(4,1),(5,0),(6,0),...}
8. 模糊推論 G.J. Hwang 12
S- Function
S (x; ) =
0 for x 2[(x- )/()]2 for x1- 2[(x- )/()]2 for x1 for x
1
0.5
0
8. 模糊推論 G.J. Hwang 13
Membership Function
A membership Function for the Fuzzy Set TALL
1.00.9
0.5
6.5Height in Feet
6 7
TALL
S (x; ) =
0 for x 2[(x- 5)/(7)]2 = [(x- 5) 2/2] for 5x1- 2[(x- 7)/(7)]2 =1-[(x- 7) 2 /2] for 6x1 for x
8. 模糊推論 G.J. Hwang 14
close(x; 1
12
( )x
with crossover pointsx =
1.0
0.5
x
Close- Function
close(x;
8. 模糊推論 G.J. Hwang 15
E = { x|x= 價格合理的牛排 ?}
220NT 120=220NT
=120NT
0.5
1.0
220NT100 340
close(x;
8. 模糊推論 G.J. Hwang 16
xforxS
xforxSx
),,;(1
),,;(),;(
2
2
function
0.5
1
x
8. 模糊推論 G.J. Hwang 17
價格合理的牛排
220)420,320,220;(1
220)220,120,20;(
)200,220;(
xforxS
xforxS
x
0.5
1
220NT120 320
8. 模糊推論 G.J. Hwang 18
Fuzzy Database systems
找一個停車容易 , 且價格合理的餐廳 以停車為優先考慮
E = {x|x = 離火車站近的餐館 }
Km
d1
d2
d5
d4
d3
8. 模糊推論 G.J. Hwang 19
Fuzzy LogicBinary Logic: The logic associated with the Boolean theory of set
Fuzzy Logic : The Logic associated with the same manner with the theory of fuzzy subsets
dialogue
Laws of thought are Fuzzy
8. 模糊推論 G.J. Hwang 20
A(x) : membership function of the element x in the fuzzy subset A
M = [0,1]
Let A, B be two fuzzy subsets of E and x is an element of Ea = A(x) , b = A(x) a,b,...M = [0,1]
)()(
1
),(
),(
bababa
aa
baMAXba
baMINba
8. 模糊推論 G.J. Hwang 21
Commutativity
Associativity
~~~~
~~~~
abba
abba
)()(
)()(
~~~~~~
~~~~~~
cbacba
cbacba
~~
~
~~
~~
~
~~~~~~~
~~~~~~~
)(
11
1
)()()(
)()()(
aa
a
aa
aa
a
cabacba
cabacba
Distributivity
8. 模糊推論 G.J. Hwang 22
DeMorgan s Law
~~~~
~~~~
baba
baba
are true, but not trivial
8. 模糊推論 G.J. Hwang 23
5 0 0.005 4 0.085 8 0.326 0 0.506 4 0.826 8 0.987 0 1.00
Tall Not Short
5 0 0.00
5 4 0.085 8 0.326 0 0.506 4 0.826 8 0.987 0 1.00
IF tall THEN not short
8. 模糊推論 G.J. Hwang 24
Tall Not Tall
5 0 0.005 4 0.085 8 0.326 0 0.506 4 0.826 8 0.987 0 1.00
Complementation
5 0 1.005 4 0.925 8 0.686 0 0.506 4 0.186 8 0.027 0 0.00
8. 模糊推論 G.J. Hwang 25
Not Tall Not Short Middle-Sized
5 0 1.005 4 0.925 8 0.686 0 0.50 AND6 4 0.186 8 0.027 0 0.00
5 0 0.005 4 0.085 8 0.326 0 0.506 4 0.826 8 0.987 0 1.00
5 0 0.005 4 0.085 8 0.326 0 0.506 4 0.186 8 0.027 0 0.00
8. 模糊推論 G.J. Hwang 26
Linguistic Hedge Operation- Scalar
Ura(x) = rUa(x)
r=0.7
r=0.5
r=0.3
8. 模糊推論 G.J. Hwang 27
Uar(x) = ((Ua(x))r
r = 0.5
r = 2
r = 4
Linguistic Hedge Operation- Power
8. 模糊推論 G.J. Hwang 28
UA =supUA(X)
NORM(A)
A
Linguistic Hedge Operation- Normalization
8. 模糊推論 G.J. Hwang 29
Ucon(A) = UA2(X)
A
CON(A)
Linguistic Hedge Operation- Concentration
8. 模糊推論 G.J. Hwang 30
UDIL(A)(X) = UA0.5(X)
DILA
Linguistic Hedge Operation- Dilation
8. 模糊推論 G.J. Hwang 31
UINT(A)(X) = 2(UA(X))2 0 UA(X) 0.51-2(1-UA(X))2 0.5 UA(X) 1.0
INT(A)A
Linguistic Hedge Operation- Intensification
8. 模糊推論 G.J. Hwang 32
Very A = CON(A)
More Or less A = DIL(A)
Slightly A = NORM(A and not (very A))
Sort of A = NORM(not (CON(A)2and DIL(A))
Pretty A = NORM(INT(A) and not INT(CON(A)))
Rather A = NORM(INT(A))
Usage of Linguistic Hedge Operations
8. 模糊推論 G.J. Hwang 33
TrueVery trueMore or less trueCompletely trueFalseVery FalseMore or less falseCompletely falseUnknownUndefined
Linguistic truth value
8. 模糊推論 G.J. Hwang 34
Fuzzy Proposition
“Mr.Wang is young.” is true.
“Mr.Wang is young.” is very true.
“Mr.Wang is young.”is more or less true.
8. 模糊推論 G.J. Hwang 35
TallHeight Degree of
membership50 0.054 0.158 0.360 0.564 0.868 0.970 1.00
VERY TallHeight Degree of
membership5 0 0.05 4 0.015 8 0.096 0 0.256 4 0.646 8 0.817 0 1.00
8. 模糊推論 G.J. Hwang 36
~ ~A A
1
0.5
0 X
Figure 5-12Fuzzy Complement
A A = min ( A(X), A(X)) 0.5
A A E
~ ~~
~
~
~~
~~
A A
A A = max ( A(X), A (X) 0.5
~
~ ~
8. 模糊推論 G.J. Hwang 37
Fuzzy Relation
A crisp relation represents the presence or absence of association, interaction, or interconnectedness between the elements of two or more sets.
8. 模糊推論 G.J. Hwang 38
Binary Relation• Any relation between two sets X and Y is known as a
binary relation. It is usually denoted by R(X,Y).
Tall 0.00 0.00 0.18 0.50 0.98 1.00 1.00
Heavy(100) (140) (160) (200) (240) (280) (300)
(5 0 ) 0.00 .00 .00 .00 .00 .00 .00 .00(5 4 ) 0.08 .00 .00 .08 .08 .08 .08 .08(5 8 ) 0.32 .00 .00 .18 .32 .32 .32 .32(6 0 ) 0.50 .00 .00 .18 .50 .50 .50 .50(6 4 ) 0.82 .00 .00 .18 .50 .82 .82 .82(6 8 ) 0.98 .00 .00 .18 .50 .98 .98 .98(7 0 ) 1.00 .00 .00 .18 .50 .98 1.00 1.00
8. 模糊推論 G.J. Hwang 39
Representation of binary relations
Membership matrices
X1X2X3X4
Y1 Y2 Y3 Y4
.9 0 .5 .3 .4 .2 .1 .9 0 0 .5 .6 0 .2 0 .4
8. 模糊推論 G.J. Hwang 40
R1(x) = 0.6/140 + 0.8/150 + 1.0/160
R2:x 120 130 140 150 160
120 1.0 0.7 0.4 0.2 0.0130 0.7 1.0 0.6 0.5 0.2140 0.4 0.6 1.0 0.8 0.5150 0.2 0.5 0.8 1.0 0.8160 0.0 0.2 0.5 0.8 1.0
y
The Relation APPROXIMATELY EQUAL Defined on Weights
R3(y) = R1(x) R2(x,y)
max min(u1(x),u2(x,y))x
Max_Min Composition
8. 模糊推論 G.J. Hwang 41
R3(y) = [0.0 0.0 0.6 0.8 1.0]
1.0 0.7 0.4 0.2 0.00.7 1.0 0.6 0.5 0.20.4 0.6 1.0 0.8 0.50.2 0.5 0.8 1.0 0.80.0 0.2 0.5 0.8 1.0R1(x) R2(x,y)
0.0/x1 x1 1.0 y1
+ 0.7
0.0/x2 x2 y2 + 0.4
0.6/x3 x3 y3 + 0.2
0.8/x4 x4 y4 + 0.0
1.0/x5 x5 y5
0.4
8. 模糊推論 G.J. Hwang 42
R3(120) = max min[(.6,.4),(.8,.2)]= max (.4,.2) = 0.4
R3(130) = max min[(.6,.6),(.8,.5),(1,.2)]= max (.6,.5,.2) = 0.6
R3(140) = max min[(.6,.1),(.8,.8),(1,.5)]= max (.6,.8,.5) = 0.8
R3(150) = max min[(.6,.8),(.8,.1),(1,.8)] = max (.6,.8,.8) = 0.8
R3(160) = max min[(.6,.5),(.8,.8),(1,1)] = max (.5,.8,1) = 1
8. 模糊推論 G.J. Hwang 43
Composition of Two Fuzzy Relations
R1(x,y)0.1 0.2 0 1 0.70.3 0.5 0 0.2 1 0.8 0 1 0.4 0.3
x1x2x3
y1 y2 y3 y4 y5
z1 z2 z3 z4
0.9 0 0.3 0.40.2 1 0.8 0 0.8 0 0.7 1 0.4 0.2 0.3 0 0 1 0 0.8
y1y2y3y4y5
R2(y,z)
R3(x,z) = ?
8. 模糊推論 G.J. Hwang 44
0.1 0.9
x1 y1 z1 0.4 0.2 0.2 Max
0 y2 0.8
1 y3 0.7 0.4
y4 0
y5
Mix
R(x) = [0.5 0.2 0.6]R(z) = ?R(z) = R(x) R1(x,y) R2(y,z) = R(x) R3(x,z)
8. 模糊推論 G.J. Hwang 45
Fuzzy Rules
Membership GradeImage Missile Fighter Airliner
1 1.0 0.0 0.0 2 0.9 0.0 0.1 3 0.4 0.3 0.2 4 0.2 0.3 0.5 5 0.1 0.2 0.7 6 0.1 0.6 0.4 7 0.0 0.7 0.2 8 0.0 0.0 1.0 9 0.0 0.8 0.210 0.0 1.0 0.0
Membership Grades for Images
8. 模糊推論 G.J. Hwang 46
1/M1
. 9/M + .1/A2
.4/M + .3/F + .2/A3
.2/M + .3/F + .5/A4
.1/M + .2/F + .7/A5
.1/M + .6/F + .4/A6
.7/M + .2/A7
1/A8
.8/M + .2/A9
1/F10
8. 模糊推論 G.J. Hwang 47
IF IMAGE4 THEN TARGET4 = 0.2/M + 0.3/F + 0.5/A
IF IMAGE6 THEN TARGET6 = 0.1/M + 0.6/F + 0.4/A
+ : set union
假設現由二個不同觀測點得到 IMAGE4 及 IMAGE6
TARGET = TARGET 4 + TARGET 6
= 0.2/M + 0.3/F + 0.5/A + 0.1/M + 0.6/F + 0.4/A
= 0.2/M + 0.6/F + 0.5/A
8. 模糊推論 G.J. Hwang 48
Maximum and Moments Methods
R1: IF MIX is too-wet
THEN Add sand and coarse aggregate
R2: IF MIX is Workable
THEN Leave alone
R3: IF MIX is too-stiff
THEN Decrease sand and coarse aggregate
.
cement watersand
removed
8. 模糊推論 G.J. Hwang 49
Fuzzy Production Rule Antecedents for Concrete Mixture Process
TOO STIFF WORKABLE TOO WET
3 4 5 6 7 8 9Concrete Slump (inches)
1.00.90.80.70.60.50.40.30.20.10.0
MembershipGrade
8. 模糊推論 G.J. Hwang 50
IF Concrete-slump = 6THEN MIX = 0.0/Too-stiff + 1.0/workable + 0.0/Too-wet
IF Concrete-slump = 7THEN MIX = 0.0/Too-stiff + 0.3/workable + 0.0/Too-wet
IF Concrete-slump = 4.8THEN MIX = 0.05/Too-stiff + 0.2/workable +0.0/Too-wet
.
.
.
8. 模糊推論 G.J. Hwang 51
R1: IF MIX is too-wet
THEN Add sand and coarse aggregate
R2: IF MIX is Workable
THEN Leave alone
R3: IF MIX is too-stiff
THEN Decrease sand and coarse aggregate
8. 模糊推論 G.J. Hwang 52
Fuzzy Production Rule Consequence for Concrete Mixture Process Control
MembershipGrade
DECREASE SAND AND COARSE AGGREGATE
-20 -10 0 +10 +20Change in sand and Coarse Aggregate (%)
1.00.90.80.70.60.50.40.30.20.10.0
LEAVE ALONEADD SAND AND COARSE
AGGREGATE
8. 模糊推論 G.J. Hwang 53
Fuzzy InferenceRule 1 : If the car is in short distance and is at a low speed
Then keep the speedRule 2 : If the car is in short distance and is at a high speed
Then decrease the speedRule 3 : If the car is in long distance and is at a low speed
Then increase the speedRule 4 : If the car is in long distance and is at a high speed
Then keep the speed
10 20 30 KM 30 50 70 KM -10 0 10 %
Short distances
long distances
lowspeed
highspeed
decreasespeed
keepspeed
increasespeed
8. 模糊推論 G.J. Hwang 54
low speed
10 20 30 30 50 70 -10 0 10
10 20 30 30 50 70 -10 0 10
10 20 30
10 20 30 30 50 70
30 50 70 -10 0 10
-10 0 10
Mass Center Z
-10 0 10
Distance: 15m Speed: 60m/h
short distance low speedkeep the speed
short distance High speeddecrease the speed
long distance
long distance High speed keep the speed
increase the speed
0.8
0.4
0.75
0.3
0.3
(0.4*0+0.75*(-10)+0.3*10+0.3*0)/
(0.4 +0.75+0.3+0.3))=-2.57
0.8
0.8
0.3
0.3
0.75
0.75
0.4
0.4
miles
miles
miles
miles
meter
meter
meter
meter %
%
%
%
8. 模糊推論 G.J. Hwang 55
Knowledge Acquisition for Fuzzy Expert Systems
Step 1: Elicit all of the elements (concepts to be learned) from the domain
expert.
Li K Fr F Cl I
8. 模糊推論 G.J. Hwang 56
Step 2: Elicit attributes ( properties or fuzzy variables).
Li K Fr F Cl I
boiling point LOW;MIDDLE;HIGHatom radius NARROW;NORMAL;WIDE
metalloid WEAK;NORMAL;STRONGnegative charge WEAK;MIDDLE;STRONG
8. 模糊推論 G.J. Hwang 57
Step 3: Fill all of the [concept, attribute] entries of the grid. A 7-scale (-3 to +3) rating and the degree of certainty(“S”,”N”).
Consider the ratings of fuzzy variable ‘boiling point’: 3 means VERY HIGH, 2 means HIGH, 1 means MORE OR LESS HIGH, 0 means MIDDLE,-1 means MORE OR LESS LOW, -2 means LOW,-3 means VERY LOW‘S’ means ‘VERY SURE’, ‘N’ means ‘NOT VERY SURE’
Li K Fr F Cl I
boiling point -1/N 0/N 1/N 1/S 2/S 3/S LOW;MIDDLE;HIGHatom radius -2/S -1/S 1/N 1/S 2/S 3/S NARROW;NORMAL;WIDE
metalloid 1/S 2/S 3/S -3/S -3/S -3/S WEAK;NORMAL;STRONGnegative charge -3/S -3/S -3/S 3/S 2/S 1/S WEAK;MIDDLE;STRONG
8. 模糊推論 G.J. Hwang 58
Step 4: the first column of the above fuzzy table is translated to the following rule:
IF boiling point is MORE OR LESS LOW, andIF boiling point is MORE OR LESS LOW, and atom radius is NARROW, andatom radius is NARROW, and
metalloid metalloid is MORE OR LESS STRONG, andis MORE OR LESS STRONG, and
negative chargenegative charge is VERY WEAKis VERY WEAK
THEN the element could be Li THEN the element could be Li TRUTH = 0.8TRUTH = 0.8
TRUTHTRUTH = = # " "
(# " " # " "). .
of S
of S of N 08 0 2
8. 模糊推論 G.J. Hwang 59
Some default functions(LS(x),RS(x),MS(x))
1 f or x
f or x
f or x
f or x
1 2
2
0
2
2
( )
( )
x
x
0 f or x
f or x
f or x
f or x
2
1 2
1
2
2
( )
( )
x
x
0 f or x
f or x+2
f or +2
x
f or x2
f or 2
x
f or x
2
1 2
1 2
2
0
2
2
2
2
( )( )
( )( )
( )( )
( )( )
x
x
x
x
8. 模糊推論 G.J. Hwang 60
• Numerical value 250 for fuzzy value LOW(LS), 300 for MIDDLE(MS), and 350 for HIGH(RS), membership functions given as below:
F(X) NOT = 1 – X F(X) MORE-OR-LESS = X0.5
• The fuzzy inference process map the inputs to the corresponding membership functions and obtains linguistic variables.
1 - -0.8- -0.6- -0.4- -0.2- -0.0-
250 300 350
350
Low Middle High
High
8. 模糊推論 G.J. Hwang 61
Knowledge Integration
While elicit expertise from multiple experts, someproblems may arise:
same element or attribute
different vocabularies
Unified vocabularies
Different ratings
Conflict happen
Insist their ratings
?
??
???
8. 模糊推論 G.J. Hwang 62
CLIPS
InteractiveKnowledgeElicitation
Unit
KnowledgeAnalysis
Unit
Tutoring
Negotiation
JAVA-based Communication Unit Fuzzy Reasoning Interface
KnowledgeBase
GeneratorKnowledge
Base
Computer Networks
CLIPS
Strategy
Unit
Knowledge Integration for a Fuzzy Tutoring System
Educator 1 Educator 2 Educator n
63G.J. Hwang8. 模糊推論
Interactive knowledge elicitation unit
Interactiveuser
interface
Fuzzy tableeditor
Membership
function
builder
Knowledge
base
8. 模糊推論 G.J. Hwang 64
• NEGOTIATOR:Please give a set of elements(concepts to be learned or decisions to be made).• EDUCATOR: Li, K, Fr, F, Cl, I. . . .• NEGOTIATOR: Select a set of fuzzy values for fuzzy variable “boiling point”: 1. LOW/MIDDLE/HIGH 2. SHORT/MIDDLE/TALL 3. LIGHT/NORMAL/HEAVY 4. SMALL/MIDDLE/BIG 0. Other (user-defined)• EDUCATOR: 1• NEGOTIATOR: Select a set of fuzzy values for fuzzy variable “atom radius”: 1. LOW/MIDDLE/HIGH 2. SHORT/MIDDLE/TALL 3. LIGHT/NORMAL/HEAVY 4. SMALL/MIDDLE/BIG 0. Other (user-defined)• EDUCATOR: 0• NEGOTIATOR: Indicate the lower bound of the fuzzy values.• EDUCATOR: NARROW• NEGOTIATOR: Indicate the middle of the fuzzy values.• EDUCATOR: NORMAL• NEGOTIATOR: Indicates the upper bound of the fuzzy values.• EDUCATOR: WIDE
Interactive user interface
8. 模糊推論 G.J. Hwang 65
Fuzzy table editor
8. 模糊推論 G.J. Hwang 66
Membership function builder
8. 模糊推論 G.J. Hwang 67
Fuzzy reasoning interface
Users
FuzzyInterface
outputs CLIPS
FuzzyInput Data
Membership Function
s
Control Rules
Domain Rules with fuzzy Expressions
input
data Defuzzification
Fuzzification
Fuzzy Inference
8. 模糊推論 G.J. Hwang 68
Knowledge analysis unit
Li K Fr F Cl I
boiling point -1/N 0/N 1/N 1/S 2/S 3/S LOW;MIDDLE;HIGHatom radius -2/S -1/S 1/N 1/S 2/S 3/S NARROW;NORMAL;WIDE
metalloid 1/S 2/S 3/S -3/S -3/S -3/S WEAK;NORMAL;STRONGnegative charge -3/S -3/S -3/S 3/S 2/S 1/S WEAK;MIDDLE;STRONG
• Check if conflict occurs and integrate tutoring strategies.• The contents of a fuzzy table is represented as
Fuzzy_value(Educator_ID, Object_name, Fuzzy_variable) and Certainty_Degree (Educator_ID, Object_name, Fuzzy_variable)
for examples, the fuzzy table below can represented as Fuzzy_value(Educator1, Li, boiling point) = -1 Certainty_Degree(Educator1, Li, boiling point) = “N” ...
8. 模糊推論 G.J. Hwang 69
Knowledge analysis rulesKnowledge analysis rulesRule_analysis_02Rule_analysis_02:
IF (1) IF (1) Current_Phase is Knowledge_Analysis Current_Phase is Knowledge_Analysis andand
(2) Fuzzy_value(Expi, Gk, Vs)(2) Fuzzy_value(Expi, Gk, Vs)Fuzzy_value(Expj, Gk, Vs)Fuzzy_value(Expj, Gk, Vs) < 0 and < 0 and
(3) Certainty_Degree (Expi, Gk, Vs) (3) Certainty_Degree (Expi, Gk, Vs) is is "S""S" and and (4) Certainty_Degree(Expj, Gk, Vs) (4) Certainty_Degree(Expj, Gk, Vs) is is ”N” ”N” andand
THEN (a) Set THEN (a) Set Suggested_Fuzzy_ValueSuggested_Fuzzy_Value be be Fuzzy_value(Expi, Gk, Vs) Fuzzy_value(Expi, Gk, Vs) andand
(b) Set (b) Set Suggested_Certainty_Degree be ”N" Suggested_Certainty_Degree be ”N" andand
(c)(c) Set Set Current_Phase Current_Phase bebe Knowledge_Negotiation Knowledge_Negotiation
8. 模糊推論 G.J. Hwang 70
Rule_analysis_04:
IF (1) IF (1) Current_Phase is Knowledge_Analysis Current_Phase is Knowledge_Analysis andand
(2) Fuzzy_value(Expi, Gk, Vs)(2) Fuzzy_value(Expi, Gk, Vs)Fuzzy_value(Expj, Gk, Vs)Fuzzy_value(Expj, Gk, Vs) 0 and 0 and
(3) Certainty_Degree (Expi, Gk, Vs) (3) Certainty_Degree (Expi, Gk, Vs) is is "S""S" and and (4) Certainty_Degree(Expj, Gk, Vs) (4) Certainty_Degree(Expj, Gk, Vs) is is "S” "S” andand
(5) Fuzzy_value(Expi, Gk, Vs) (5) Fuzzy_value(Expi, Gk, Vs) Fuzzy_value(Expj, Gk, Vs) Fuzzy_value(Expj, Gk, Vs) 00
THEN (a) Set THEN (a) Set Suggested_Fuzzy_ValueSuggested_Fuzzy_Value be be Fuzzy_value(Expi, Gk, Vs) Fuzzy_value(Expi, Gk, Vs) andand
(b) Set (b) Set Suggested_Certainty_Degree be "S" Suggested_Certainty_Degree be "S" andand
(c)(c) Set Set Current_Phase Current_Phase bebe Knowledge_Negotiation Knowledge_Negotiation
8. 模糊推論 G.J. Hwang 71
Rule_analysis_03:
IF (1) IF (1) Current_Phase is Knowledge_Analysis Current_Phase is Knowledge_Analysis andand
(2) Fuzzy_value(Expi, Gk, Vs)(2) Fuzzy_value(Expi, Gk, Vs)Fuzzy_value(Expj, Gk, Vs)Fuzzy_value(Expj, Gk, Vs) < 0 and < 0 and
(3) Certainty_Degree (Expi, Gk, Vs) (3) Certainty_Degree (Expi, Gk, Vs) is is "S""S" and and
(4) Certainty_Degree(Expj, Gk, Vs) (4) Certainty_Degree(Expj, Gk, Vs) is is "S” "S” andand
THEN (a) Set THEN (a) Set Suggested_Fuzzy_ValueSuggested_Fuzzy_Value be be “Conflict” “Conflict” andand
(b)(b) Set Set Current_Phase Current_Phase bebe Knowledge_Negotiation Knowledge_Negotiation
8. 模糊推論 G.J. Hwang 72
Tutoring Strategy Negotiation unit
• Present suggestions by knowledge analysis unitPresent suggestions by knowledge analysis unit• When a When a conflictconflict occurs, experts are asked to give suggestions. occurs, experts are asked to give suggestions.
“ “ over-generalover-general” ” happenhappen
BearBear
American gray bearAmerican gray bear bear of North bear of North PolePole
invoke invoke Object_Specialization Object_Specialization
procedureprocedure
An example
8. 模糊推論 G.J. Hwang 73
• Converting fuzzy table to the format of the tutoring strategy system shell (e.g., CLIPS format shown in the followings).
(deffacts initial-state (is boiling-point MORE-OR-LESS LOW) (is atom-radius NARROW) (is metalloid MORE-OR-LESS STRONG) (is negative-charge VERY WEAK))
(defrule Rule1 ?x1 <- (is ?X1 MORE-OR-LESS LOW) ?x2 <- (is ?X2 NARROW) ?x3 <- (is ?X3 MORE-OR-LESS STRONG) ?x4 <- (is ?X4 VERY WEAK) => (retract ?x1 ?x2 ?x3 ?x4) (assert (is Li -1-21-3)) (assert (CF 0.8)) (printout t ”Li is -1-21-3 with CF=0.8" crlf))
Knowledge base generator
8. 模糊推論 G.J. Hwang 74
Illustrative example• Eliminate redundancy and incompleteness of elements and attributes.
8. 模糊推論 G.J. Hwang 75
• Select or define a set of fuzzy values for each fuzzy variable.
8. 模糊推論 G.J. Hwang 76
• Three educators fill the fuzzy values with degree of certainty.• The system invokes knowledge analysis rules.
8. 模糊推論 G.J. Hwang 77
• Check conflict values and decide if invokes Object_Specialization procedure.• Generate fuzzy rules.
8. 模糊推論 G.J. Hwang 78
Applications of Fuzzy Logic
• Fuzzy Expert Systems– Fuzzy Inferences in Expert Systems– Learning Mechanisms for Fuzzy Expert Systems– Knowledge Acquisition for Fuzzy Expert Systems
• Fuzzy Database Systems– Fuzzy Query Language– Fuzzy Database Management
8. 模糊推論 G.J. Hwang 79
Case Study: ITED-An Intelligent Tutoring, Evaluation and Diagnostic System
www.ited.im.ncnu.edu.tw
8. 模糊推論 G.J. Hwang 80
Prerequisite relationships among concepts
• Effectively learning a scientific concept normally requires first learning some basic concepts
• Consider two concepts Ci and Cj. If Ci is prerequisite to efficiently performing the more complex and higher level concept Cj, then a concept effect relationship Ci Cj is said to exist
8. 模糊推論 G.J. Hwang 81
Addition of integers
Positiveintegers
Multiplicationof integers
Division ofintegers
Subtraction of integers
Negativeintegers
Zero
Primenumbers
This is an example of concept effect
relationships for Integers and the relevant
operations
8. 模糊推論 G.J. Hwang 82
Conceptual Effect Table (CET)
Cj C1 C2 C3 C4 C5 C6 C7 C8
Prerequisite
Zero Positive integers
Addition Subtrac-tion
Multipli-cation
Negative integers
Division Prime numbers
C1 0 0 0 1 0 0 0 0 C2 0 0 1 0 0 0 0 0 C3 0 0 0 1 1 0 0 0 C4 0 0 0 0 0 0 0 0 C5 0 0 0 0 0 0 0 0 C6 0 0 0 0 0 1 1 0 C7 0 0 0 0 0 0 0 1
Ci
C8 0 0 0 0 0 0 0 0 NPj 0 0 1 2 1 1 2 1
Those concept effect relationships can be
represented as a CET.
e.g. C3 C4
8. 模糊推論 G.J. Hwang 83
Test Item Relationship Table (TIRT)
Concept Cj Prerequisite
C1 C2 C3 C4 C5 C^ C7 C8 Q1 1 0.2 0 0 0 0 0 0 Q2 0 0.8 0.4 0 0 0 0 0 Q3 0 0 0.6 0.2 0 0 0 0 Q4 0 0 0 1 0 0 0 0 Q5 0 0 0 0 0 0 0 0 Q6 0.2 0 0 0 0.8 0.2 0 0 Q7 0 0 0 0 0 1 0 0
Q8 0 0 0 0 0 0 0.6 0.4 Q9 0 0 0 0 0.2 0 0 0
Test item
Qi
Q10 0 0 0 0 0.2 0 0.4 1
The relationships among each test item and each concept can be
represented as a TIRT.
O: Not relevant 1: Very strongly relevant
8. 模糊推論 G.J. Hwang 84
Student Answer Sheet table (AST)
Test item Student
Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10
S1 0 0 1 0 0 1 1 0 0 0 S2 0 1 1 0 0 1 1 0 0 0 S3 0 0 0 1 0 1 1 0 0 0 S4 0 1 1 1 0 0 1 0 0 0 S5 0 0 1 0 0 0 1 1 0 0
An AST is used to record the answers of the students to each test items.
O: The student has correctly answered the test item
1: The student failed to correctly answer the test item
8. 模糊推論 G.J. Hwang 85
Performing Max-Min Composition
Error_Degree (Si, Cj) = AST 。 TIRT 。 CET
0000000000
0000000000
0000000010
0000000101
0000000100
0000100000
0001100000
0100000000
14.002.00000
0002.00000
4.06.0000000
00100000
002.08.00002.0
00000000
00001000
00002.06.000
000004.08.00
0000002.01
0011000100
0001001110
0001101000
0001100110
0001100100
8
7
6
5
4
3
2
1
10
9
8
7
6
5
4
3
2
1
5
4
3
2
1
C
C
C
C
C
C
C
C
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
S
S
S
S
S
04.006.06.1002.06.02.0
00000.1002.10.12.1
00002.1008.100.1
00002.1000.10.12.000002.1000.16.02.0
10987654321
5
4
3
2
1
CCCCCCCCCC
S
S
S
SS
8. 模糊推論 G.J. Hwang 86
Generate learning guidance
IF Learning_Status (Si, Cj) is Poorly-learned
THEN Arrange for Student Si to re-learn the unit containing Concept Cj
IF Learning_Status (Si, Cj) is Partially-learned
THEN Arrange more practice concerning Concept Cj for Student Si
IF Learning_Status (Si, Cj) is Well-learned
THEN Record that Student Si has passed the study of Concept Cj
8. 模糊推論 G.J. Hwang 87
Membership functions for Learning Status
Error_degree (Si, Cj)0 0.5 1.0
Well-Learned Poorly-LearnedPartially- Learned
Lea
rnin
g_st
atus
(S
i, C
j)
1.0
8. 模糊推論 G.J. Hwang 88
Learning guidance generated by ITED
8. 模糊推論 G.J. Hwang 89
Case Study: 網路學習行為分析–學習效率 (Efficiency of Learning)
–學習意願 (Willingness)
–耐心度 (Patience)
–專心度 (Concentration)
–閒置 (Idleness)
–理解度 (Comprehension)
–聊天 (Chat)
8. 模糊推論 G.J. Hwang 90
學習意願分析• 學生用心學習的意願• 分析依據:有效登入時間 /登入時間
模糊推理法則If willingness is low Then insert INT(T×0.5) corresponding willingness frames.
If willingness is average Then insert INT(T×0.25) corresponding willingness frames
If willingness is high Then keep the current status.
0
0.2
0.4
0.6
0.8
1
0 0.2 0.4 0.6 0.8 1
low average highdegree
ELT/LT
8. 模糊推論 G.J. Hwang 91
專心度分析• 學生集中精神於瀏覽教材的程度• 分析依據:回應時間
模糊推理法則If concentration is lowThen insert a corresponding concentration frame.
If concentration is highThen keep the current status.
If concentration is noresponseThen keep the current status.
0
0.2
0.4
0.6
0.8
1
0 0.25 0.5 0.75 1
low no responsehigh
RT
degree
8. 模糊推論 G.J. Hwang 92
聊天狀態分析• 學生利用線上討論區來閒聊而不是討論課程• 分析依據:學習相關比率
模糊推理法則If chat is highThen record this status and warn the student.
If chat is averageThen keep the current status.
If chat is lowThen keep the current status
0
0.2
0.4
0.6
0.8
1
0 0.2 0.4 0.6 0.8 1
lowaveragehigh
degree
LR