Chapter 8 Fuzzy Inference 模糊推論 • Fuzzy set and Fuzzy Logic – why “Fuzzy Subset” ? Ordinary set -- the foundation of present day mathematics.(S) e S.

Download Report

Transcript Chapter 8 Fuzzy Inference 模糊推論 • Fuzzy set and Fuzzy Logic – why “Fuzzy Subset” ? Ordinary set -- the foundation of present day mathematics.(S) e S.

Chapter 8
Fuzzy Inference
模糊推論
• Fuzzy set and Fuzzy Logic
– why “Fuzzy Subset” ?
Ordinary set -- the foundation of present day
mathematics.(S)
e
S : a set
e5 : an element
5
 S  {e 2 , e 3 , e5 , e 6 }
But in real world , the relation is usually “fuzzy” !
John is 170 cm 
John : an element
8. 模糊推論
or
G.J. Hwang

{ x | x is tall }
1
S = {x|x is tall}
180cm 高的人  S ? Yes
179cm 高的人  S ? Yes
(179 和180只差 1cm)
178cm 高的人  S ? Yes
(178 和179 只差 1cm)
•
•
•
170cm 高的人  S ? Yes
(170 和171 只差 1cm)
169cm 高的人  S ? Yes
(169 和170 只差 1cm)
•
•
•
120cm 高的人  S ? Yes
(120 和121 只差 1cm)
8. 模糊推論
No
G.J. Hwang
Why? 既然170是,
為何169不是?
2
S ={x|x is tall}
假如找100個人投票,互相推選屬於S和不屬於S的人
150cm
160cm
170cm
180cm
1
0.5
0
0
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
8. 模糊推論
G.J. Hwang
JohnS
3
• 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
4
A different representation
A = {(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(x4) = 1,
8. 模糊推論
A(x2) = 0,
A(x5) = 0
A(x3) = 0
A = {(x1,1),(x2,0),(x3,0),(x4,1),(x5,0)}
G.J. Hwang
5
Given two subsets A and B
(x)= 1,
if x  A
= 0,
(x)= 1,
if x A
if x  B
= 0,
if x 
AB(x)= 1,
if x  A B
= 0,
if x A B

AB(x)= (x) • (x)
0
1
8. 模糊推論
0
1
0
0
0
1
Boolean
product
G.J. Hwang
6
Union
AB (x)= 1,
if x  A B
= 0,
if x A B
AB (x)= (x) + (x)
+
0
1
0
1
0
1
1
1
Boolean
sum
e.g. E = {x1,x2,x3,x4,x5}
two subsets A and B
A={x2,x3,x5},
B={x1,x3,x5}
AB = {(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)}
8. 模糊推論
G.J. Hwang
7
• 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)
通常是主觀的認定,但至少
表達了Xis之間的相對程度
A E  A is a Fuzzy Subset of E

A E
x1 ,
x2 ,
x3
0.2

membership
8. 模糊推論
0
0.3

x2A
G.J. Hwang
8
• Zadehs 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)},
xE.
Where
(x) : grade of membership of x in A
(x) takes its values in a set M (membership set)
x mapping M
(x)
IF M={0,1}
fuzzy subset of A will be a nonfuzzy subset 
(or
ordinary
set)
8. 模糊推論
G.J. Hwang
9
E.g.
Let N be the set of natural numbers
N = {0,1,2,3,4,5,6,...}
consider the fuzzy set A of smallnatural 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
10
S- Function
S (x; ) =
0
2[(x- )/()]2
1- 2[(x- )/()]2
1
for x 
for x
for x
for x
1
0.5
0

8. 模糊推論

G.J. Hwang

11
S (x; ) =
0
2[(x- 5)/(7)]2 = [(x- 5) 2/2]
1- 2[(x- 7)/(7)]2 =1-[(x- 7) 2 /2]
1
1.0
0.9
for x 
for 5x
for 6x
for x
TALL
Membership
Function
0.5
6
6.5
7
Height in Feet
8. 模糊推論
A membership Function for the Fuzzy Set TALL
G.J. Hwang
12
Close- Function
1
close(x; )
1 +
(
x 


2
)
with crossover points
x = 
1.0
close(x; )
0.5

8. 模糊推論

G.J. Hwang
+
x
13
E = { x|x= 價格合理的牛排 ?}
220NT  120
=220NT
=120NT
1.0
close(x; 220 120)
0.5
100 220NT 340
8. 模糊推論
G.J. Hwang
14
function
for x  
 S ( x;    ,    2 ,  )
 ( x;  ,  )  

1

S
(
x
;

,

+
2 ,  +  ) for x  

1
1
0.5

0
x

8. 模糊推論
2

G.J. Hwang
+2
+
15
 ( x ; 220 , 200 )
220
200
2020
for x  220
 S ( x ; 20 ,120 , 220 )
 
1  S ( x ; 220 , 320 , 420 ) for x  220
價格合理的牛排
1
1
0.5
0

20
120
220NT
320
20
200
8. 模糊推論
G.J. Hwang
16
Fuzzy Database systems
找一個停車容易,且價格合理的餐廳
以停車為優先考慮
E = {x|x = 離火車站近的餐館 }
d1
d
3
d
4
8. 模糊推論
d
5
0
Km
d
2
G.J. Hwang
17
Fuzzy Logic
Binary 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
18
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 E
a = A(x) , b = A(x)
a,b,...M = [0,1]
a  b  MIN ( a , b )
a  b  MAX ( a , b )
a 1 a
a  b  (a  b)  (a  b )
8. 模糊推論
G.J. Hwang
19
Commutativity
Distributivity
a  b  b a
~
~
~
a  (b  c )  (a  b )  (a  c )
~
~
a  b  b a
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
a1  a
~
~
~
~
a 1  1
~
(a )  a
~
8. 模糊推論
~
a   a
(a  b )  c  a  (b  c )
~
~
~
(a  b )  c  a  (b  c )
~
~
a  
~
~
~
a  (b  c )  (a  b )  (a  c )
~
Associativity
~
~
G.J. Hwang
~
20
DeMorgan s Law
a b  a b
~
~
~
~
are true, but not trivial
a b  a b
~
8. 模糊推論
~
~
~
G.J. Hwang
21
Tall
5 0
5 4
5 8
6 0
6 4
6 8
7 0
Not Short
5 0
5 4
5 8
6 0
6 4
6 8
7 0
0.00
0.08
0.32
0.50
0.82
0.98
1.00
0.00
0.08
0.32
0.50
0.82
0.98
1.00
IF tall THEN not short
8. 模糊推論
G.J. Hwang
22
Complementation
Tall
5 0
5 4
5 8
6 0
6 4
6 8
7 0
8. 模糊推論
Not Tall
5 0
5 4
5 8
6 0
6 4
6 8
7 0
0.00
0.08
0.32
0.50
0.82
0.98
1.00
G.J. Hwang
1.00
0.92
0.68
0.50
0.18
0.02
0.00
23
Not Tall
5 0
5 4
5 8
6 0
6 4
6 8
7 0
8. 模糊推論
Not Short
1.00
5 0
0.92
5 4
0.68
5 8
0.50 AND 6 0
0.18
6 4
0.02
6 8
0.00
7 0
0.00
0.08
0.32
0.50
0.82
0.98
1.00
G.J. Hwang
Middle-Sized
5 0
5 4
5 8
6 0
6 4
6 8
7 0
0.00
0.08
0.32
0.50
0.18
0.02
0.00
24
Linguistic Hedge Operation- Scalar
Ura(x) = rUa(x)
1
r=0.7
r=0.5
r=0.3
8. 模糊推論
G.J. Hwang
25
Linguistic Hedge Operation- Power
Uar(x) = ((Ua(x))r
1
r = 0.5
r=2
r=4
8. 模糊推論
G.J. Hwang
26
Linguistic Hedge Operation- Normalization
UA =supUA(X)
1
NORM(A)
A
8. 模糊推論
G.J. Hwang
27
Linguistic Hedge Operation- Concentration
Ucon(A) = UA2(X)
1
A
CON(A)
8. 模糊推論
G.J. Hwang
28
Linguistic Hedge Operation- Dilation
UDIL(A)(X) = UA0.5(X)
1
DIL
A
0.
0
8. 模糊推論
G.J. Hwang
29
Linguistic Hedge Operation- Intensification
2(U
A(X))2
UINT(A)(X) = 
1-2(1-UA(X))2
0 UA(X) 0.5
0.5 UA(X) 1.0
A
INT(A)
1
0.
0
8. 模糊推論
G.J. Hwang
30
Usage of Linguistic Hedge Operations
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))
8. 模糊推論
G.J. Hwang
31
Linguistic truth value
True
Very true
More or less true
Completely true
False
Very False
More or less false
Completely false
Unknown
Undefined
8. 模糊推論
G.J. Hwang
32
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
33
Tall
Height
5 0
5 4
5 8
6 0
6 4
6 8
7 0
8. 模糊推論
VERY Tall
Degree of
membership
0.0
0.1
0.3
0.5
0.8
0.9
1.00
Height
5 0
5 4
5 8 
6 0 
6 4 
6 8 
7 0 
G.J. Hwang
Degree of
membership
0.0
0.01
0.09
0.25
0.64
0.81
1.00
34

A
~
1
~
A
0.5
0
X

Figure 5-12
Fuzzy Complement
AA  E
~ ~

AA  
~ ~

A = min ( ~
~A  ~
, A~(X)
 )  0.5
A(X)

A = max (  ~
~A  ~
, A~(X)
0.5

A(X)
8. 模糊推論
G.J. Hwang
35
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
36
Binary Relation
• Any relation between two sets X and Y is known as a
binary relation. It is usually denoted by R(X,Y).
Heavy(100) (140) (160) (200) (240) (280) (300)
Tall
0.00 0.00 0.18 0.50 0.98 1.00 1.00
(5 0 ) 0.00
(5 4 ) 0.08
(5 8 ) 0.32
(6 0 ) 0.50
(6 4 ) 0.82
(6 8 ) 0.98
(7 0 ) 1.00
8. 模糊推論
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.08
.18
.18
.18
.18
.18
G.J. Hwang
.00
.08
.32
.50
.50
.50
.50
.00 .00
.08 .08
.32 .32
.50 .50
.82 .82
.98 .98
.98 1.00
.00
.08
.32
.50
.82
.98
1.00
37
Representation of binary relations
Membership matrices
Y1 Y2 Y3 Y4
X1
X2
X3
X4
8. 模糊推論
.9
.4
0
0
0
.2
0
.2
.5
.1
.5
0
G.J. Hwang
.3
.9
.6
.4
38
Max_Min Composition
R1(x) = 0.6/140 + 0.8/150 + 1.0/160
R2:
x
120 130
y
140 150 160
120
130
140
150
160
1.0
0.7
0.4
0.2
0.0
0.4
0.6
1.0
0.8
0.5
0.7
1.0
0.6
0.5
0.2
0.2
0.5
0.8
1.0
0.8
0.0
0.2
0.5
0.8
1.0
The Relation APPROXIMATELY EQUAL Defined on Weights
R3(y) = R1(x)
8. 模糊推論
R2(x,y)
max min(u1(x),u2(x,y))
x
G.J. Hwang
39
1.0
0.7
0.4
0.2
0.0
R3(y) = [0.0 0.0 0.6 0.8 1.0]
8. 模糊推論
R1(x)
0.0/x1
R2(x,y)
x1
1.0
+
0.0/x2
+
0.6/x3
+
0.8/x4
+
1.0/x5
0.7
0.7
1.0
0.6
0.5
0.2
0.4
0.6
1.0
0.8
0.5
0.2
0.5
0.8
1.0
0.8
0.0
0.2
0.5
0.8
1.0
y1
0.4
x2
y2
0.4
x3
y3
0.2
x4
y4
0.0
x5
y5
G.J. Hwang
40
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
41
Composition of Two Fuzzy Relations
R1(x,y)
x1
x2
x3
y2 y3 y4 y5
0.2 0 1 0.7
0.5 0 0.2 1
0
1 0.4 0.3
z1 z2 z3
R2(y,z)
y1
y2
y3
y4
y5
8. 模糊推論
y1
0.1
0.3
0.8
R3(x,z) = ?
z4
0.9 0 0.3 0.4
0.2 1 0.8 0
0.8 0 0.7 1
0.4 0.2 0.3 0
0 1 0 0.8
G.J. Hwang
42
0.1
0.9
x1
y1
z1
0.4
0.2
0
0.2
Max
y2
0.8
1
0.7
y3
0.4
y4
0
y5
Mix
R(x) = [0.5 0.2 0.6]
R(z) = ?
R(z) = R(x) R1(x,y)
= R(x) R3(x,z)
8. 模糊推論
G.J. Hwang
R2(y,z)
43
Fuzzy Rules
Image
Membership Grade
Missile
Fighter
Airliner
1
2
3
4
5
6
7
8
9
10
1.0
0.9
0.4
0.2
0.1
0.1
0.0
0.0
0.0
0.0
0.0
0.0
0.3
0.3
0.2
0.6
0.7
0.0
0.8
1.0
0.0
0.1
0.2
0.5
0.7
0.4
0.2
1.0
0.2
0.0
Membership Grades for Images
8. 模糊推論
G.J. Hwang
44
1/M
1
. 9/M + .1/A
2
.1/M + .6/F + .4/A .7/M + .2/A
6
7
8. 模糊推論
.4/M + .3/F + .2/A .2/M + .3/F + .5/A .1/M + .2/F + .7/A
3
4
5
1/A
8
G.J. Hwang
.8/M + .2/A
9
1/F
10
45
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
46
Maximum and Moments Methods
cement
removed
water
sand
.
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
47
Membership
Grade
TOO STIFF
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
3
4
WORKABLE
TOO WET
5
6
7
8
Concrete Slump (inches)
9
Fuzzy Production Rule Antecedents for Concrete Mixture Process
8. 模糊推論
G.J. Hwang
48
IF
Concrete-slump = 6
THEN MIX = 0.0/Too-stiff + 1.0/workable + 0.0/Too-wet
IF
Concrete-slump = 7
THEN MIX = 0.0/Too-stiff + 0.3/workable + 0.0/Too-wet
.
.
.
IF
Concrete-slump = 4.8
THEN MIX = 0.05/Too-stiff + 0.2/workable +0.0/Too-wet
8. 模糊推論
G.J. Hwang
49
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
50
Fuzzy Production Rule Consequence for
Concrete Mixture Process Control
DECREASE SAND AND
COARSE AGGREGATE
LEAVE ALONE
ADD SAND AND COARSE
AGGREGATE
1.0
0.9
Membership
0.8
Grade
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-20
-10
0
+10 +20
Change in sand and Coarse Aggregate (%)
8. 模糊推論
G.J. Hwang
51
Fuzzy Inference
Rule 1 : If the car is in short distance and is at a low speed
Then keep the speed
Rule 2 : If the car is in short distance and is at a high speed
Then decrease the speed
Rule 3 : If the car is in long distance and is at a low speed
Then increase the speed
Rule 4 : If the car is in long distance and is at a high speed
Then keep the speed
Short
distances
long
distances
low
speed
high
speed
10 20 30 KM 30 50 70 KM
8. 模糊推論
G.J. Hwang
decrease
speed
keep
speed
increase
speed
-10 0 10 %
52
0.8
0.8
short distance
10
low speed
20
30
meter
keep the speed
0.4
30
50
70 miles
0.4
-10
0
10 %
decrease the
speed
0.8
short distance
10
High speed
20
long distance
0.3
10
long distance
0.75
20
30 meter
0.75
30
50
70 miles
low speed
30 meter
0
0.4
30
50
High speed
0.3
-10
70 miles
10 %
0.3
-10
0
10
0.75
increase the
speed
%
keep the speed
0.3
10
20
30 meter
30
Distance: 15m
50
70 miles
8. 模糊推論
0
10 %
Speed: 60m/h
(0.4*0+0.75*(-10)+0.3*10+0.3*0)/
(0.4 +0.75+0.3+0.3))=-2.57
-10
-10
Mass
Center
G.J. Hwang
0
10
Z
53
Knowledge Acquisition for
Fuzzy Expert Systems
Step 1: Elicit all of the elements (concepts to be learned) from the domain
expert.
Li
8. 模糊推論
K
Fr
F
G.J. Hwang
Cl
I
54
Step 2: Elicit attributes ( properties or fuzzy variables).
Li
K
Fr
F
Cl
boiling point
atom radius
metalloid
negative charge
8. 模糊推論
I
LOW;MIDDLE;HIGH
NARROW;NORMAL;WIDE
WEAK;NORMAL;STRONG
WEAK;MIDDLE;STRONG
G.J. Hwang
55
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”).
Li
boiling point
atom radius
metalloid
negative charge
K
Fr
F
Cl
-1/N 0/N 1/N 1/S 2/S
-2/S -1/S 1/N 1/S 2/S
1/S 2/S 3/S -3/S -3/S
-3/S -3/S -3/S 3/S 2/S
I
3/S
3/S
-3/S
1/S
LOW;MIDDLE;HIGH
NARROW;NORMAL;WIDE
WEAK;NORMAL;STRONG
WEAK;MIDDLE;STRONG
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’
8. 模糊推論
G.J. Hwang
56
Step 4: the first column of the above fuzzy table is translated
to the following rule:
IF boiling point is
atom radius
is
metalloid
is
negative charge is
MORE OR LESS LOW, and
NARROW, and
MORE OR LESS STRONG, and
VERY WEAK
THEN the element could be Li
TRUTH =
8. 模糊推論
TRUTH = 0.8
# of " S "
(# of " S " + # of " N " )
G.J. Hwang
 0.8 + 0.2
57
Some default functions(LS(x),RS(x),MS(x))
1

x   2
1  2 (
)





2 ( x   ) 2

  

0
0

2


1


1


2


0
x  
f or
f or   x  
f or   x  
x  
f or
f or
(
x  
  
 2 (
 2 (
(
8. 模糊推論
)
2
x  
  
x  
  
x  
  
)
2
f or
)
2
)
2
0

x   2
2 (
)
   

1  2 ( x   ) 2

  

1
f or
f or   x  
f or   x  
f or
x  
(  + )
  x 
(  + )
2
2
 x  
(  +  )
2
(  +  )
 x  
2
f or
x  
x  
f or   x 
f or
f or
x  
G.J. Hwang
58
• Numerical value 250 for fuzzy value LOW(LS), 300 for
MIDDLE(MS), and 350 for HIGH(RS), membership functions
given as below:
Low
1 - H ig h
M id d le
H ig h
-0 .8 0
- .6 -0 .4 0
- .2 -0 .0 -
F(X) NOT = 1 – X
0.5
3 0X
0
F(X) MORE-OR-LESS =
250
350
350
• The fuzzy inference process map the inputs to the corresponding
membership functions and obtains linguistic variables.
8. 模糊推論
G.J. Hwang
59
Knowledge Integration
While elicit expertise from multiple experts, some
problems may arise:
same element or
attribute
different
vocabularies
Unified
vocabularies
Different
ratings
Conflict
happen
Insist their
ratings
8. 模糊推論
?
G.J. Hwang
??
???
60
Knowledge Integration for
a Fuzzy Tutoring System
Interactive
Knowledge
Elicitation
Unit
Knowledge
Analysis
Unit
JAVA-based Communication Unit
Tutoring
Strategy
Negotiation
Unit
Knowledge
Base
Generator
Knowledge
Base
Fuzzy Reasoning Interface
CLIPS
CLIPS
Computer Networks
Educator 1
8. 模糊推論
Educator 2
Educator n
G.J. Hwang
61
Interactive knowledge elicitation
unit
Fu zzy ta b le
e d ito r
In te ra c tiv e
u se r
in te rfa c e
K n o w le d g e
b a se
M e m b e rsh ip
fu n c tio n
b u ild e r
8. 模糊推論
G.J. Hwang
62
Interactive user interface
•
•
•
•
•
•
•
•
•
•
•
•
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
8. 模糊推論
G.J. Hwang
63
Fuzzy table editor
8. 模糊推論
G.J. Hwang
64
Membership function builder
8. 模糊推論
G.J. Hwang
65
Fuzzy reasoning interface
8. 模糊推論
G.J. Hwang
66
Knowledge analysis unit
• 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”
...
Li
boiling point
atom radius
metalloid
negative charge
8. 模糊推論
K
Fr
F
Cl
-1/N 0/N 1/N 1/S 2/S
-2/S -1/S 1/N 1/S 2/S
1/S 2/S 3/S -3/S -3/S
-3/S -3/S -3/S 3/S 2/S
I
3/S
3/S
-3/S
1/S
G.J. Hwang
LOW;MIDDLE;HIGH
NARROW;NORMAL;WIDE
WEAK;NORMAL;STRONG
WEAK;MIDDLE;STRONG
67
Knowledge analysis rules
Rule_analysis_02:
IF
(1) Current_Phase is Knowledge_Analysis and
(2) Fuzzy_value(Expi, Gk, Vs)Fuzzy_value(Expj, Gk, Vs) < 0 and
(3) Certainty_Degree (Expi, Gk, Vs) is "S" and
(4) Certainty_Degree(Expj, Gk, Vs) is ”N” and
THEN (a) Set Suggested_Fuzzy_Value be Fuzzy_value(Expi, Gk, Vs)
and
(b) Set Suggested_Certainty_Degree be ”N" and
(c) Set Current_Phase be Knowledge_Negotiation
8. 模糊推論
G.J. Hwang
68
Rule_analysis_04:
IF
(1) Current_Phase is Knowledge_Analysis and
(2) Fuzzy_value(Expi, Gk, Vs)Fuzzy_value(Expj, Gk, Vs)  0 and
(3) Certainty_Degree (Expi, Gk, Vs) is "S" and
(4) Certainty_Degree(Expj, Gk, Vs) is "S” and
(5) Fuzzy_value(Expi, Gk, Vs)  Fuzzy_value(Expj, Gk, Vs)  0
THEN (a) Set Suggested_Fuzzy_Value be Fuzzy_value(Expi, Gk, Vs)
and
(b) Set Suggested_Certainty_Degree be "S" and
(c) Set Current_Phase be Knowledge_Negotiation
8. 模糊推論
G.J. Hwang
69
Rule_analysis_03:
IF
(1) Current_Phase is Knowledge_Analysis and
(2) Fuzzy_value(Expi, Gk, Vs)Fuzzy_value(Expj, Gk, Vs) < 0 and
(3) Certainty_Degree (Expi, Gk, Vs) is "S" and
(4) Certainty_Degree(Expj, Gk, Vs) is "S” and
THEN (a) Set Suggested_Fuzzy_Value be “Conflict” and
(b) Set Current_Phase be Knowledge_Negotiation
8. 模糊推論
G.J. Hwang
70
Tutoring Strategy Negotiation unit
• Present suggestions by knowledge analysis unit
• When a conflict occurs, experts are asked to give suggestions.
“ over-general”
happen
An example
Bear
invoke
Object_Specialization
procedure
American gray bear
8. 模糊推論
G.J. Hwang
bear of North Pole
71
Knowledge base generator
• 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))
8. 模糊推論
G.J. Hwang
72
Illustrative example
•
Eliminate redundancy and incompleteness of elements and attributes.
8. 模糊推論
G.J. Hwang
73
• Select or define a set of fuzzy values for each fuzzy variable.
8. 模糊推論
G.J. Hwang
74
• Three educators fill the fuzzy values with degree of certainty.
• The system invokes knowledge analysis rules.
8. 模糊推論
G.J. Hwang
75
• Check conflict values and decide if invokes Object_Specialization procedure.
• Generate fuzzy rules.
8. 模糊推論
G.J. Hwang
76
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
77
Case Study: ITED-An Intelligent Tutoring,
Evaluation and Diagnostic System
www.ited.im.ncnu.edu.tw
8. 模糊推論
G.J. Hwang
78
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
79
Positive
integers
Addition of
integers
Zero
Subtraction
of integers
Negative
integers
This is an example of
concept effect
relationships for Integers
and the relevant
operations
Multiplication
of integers
Division of
integers
Prime
numbers
8. 模糊推論
G.J. Hwang
80
Conceptual Effect Table (CET)
Those concept effect
relationships can be
represented as a CET.
Cj
P rerequisite
C1
Ci
C1
C3
C4
C5
C6
C7
C8
Z ero P o sitive A d d itio n S ub trac M ultip li-c N egative D ivisio n P rim e
integers
-tio n
atio n
integers
num b ers
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
C8
0
0
0
0
0
0
0
0
NPj
0
0
1
2
1
1
2
1
e.g. C3  C4
8. 模糊推論
C2
G.J. Hwang
81
Test Item Relationship Table
(TIRT)
The relationships among each test
item and each concept can be
represented as a TIRT.
P re re q u isite
Te st ite m
Qi
C oncept C j
Q1
Q2
Q3
Q4
Q5
Q6
Q7
C1
1
0
0
0
0
0 .2
0
C2
0 .2
0 .8
0
0
0
0
0
C3
0
0 .4
0 .6
0
0
0
0
C4
0
0
0 .2
1
0
0
0
C5
0
0
0
0
0
0 .8
0
C^
0
0
0
0
0
0 .2
1
C7
0
0
0
0
0
0
0
C8
0
0
0
0
0
0
0
Q8
Q9
Q 10
0
0
0
0
0
0
0
0
0
0
0
0
0
0 .2
0 .2
0
0
0
0 .6
0
0 .4
0 .4
0
1
O: Not relevant
8. 模糊推論
1: Very strongly relevant
G.J. Hwang
82
Student Answer Sheet table (AST)
An AST is used to record the
answers of the students to each test
items.
T est item
S tudent
S1
S2
S3
S4
S5
Q1
Q2
Q3
Q4
Q5
Q6
Q7
Q8
Q9
Q 10
0
0
0
0
0
0
1
0
1
0
1
1
0
1
1
0
0
1
1
0
0
0
0
0
0
1
1
1
0
0
1
1
1
1
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
O: The student has correctly answered the test item
1: The student failed to correctly answer the test item
8. 模糊推論
G.J. Hwang
83
Performing Max-Min Composition
Error_Degree (Si, Cj) = AST。TIRT。CET
S1 0

S2 0

 S 3 0

S 4 0
S 5  0

0
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
0
0
1
0
1
1
0
0
1
1
1
0
0
1
0
0
0
1
0
0
0
1
1
0
S1
S2
S3
S4
S5
C 1

0 .2

 0 .2
1 . 0

1 . 2
 0 .2

8. 模糊推論
Q1  1

Q2 0

Q3  0
0

 Q4  0
0
 Q  0
5
0 

 Q 6  0 .2
0
Q7  0

0 
Q8  0

Q9
0

Q 10  0
0 .2
0
0
0
0
0
0 .8
0 .4
0
0
0
0
0
0 .6
0 .2
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0 .8
0 .2
0
0
0
0
0
1
0
0
0
0
0
0
0 .6
0
0
0
0 .2
0
0
0
0
0
0 .2
0
0 .4
C2
C3
C4
C5
C6
C7
C8
C9
0 .6
1 .0
1 .0
1 .0
0
0
0
0
1 .2
1 .2
0
0
0
0
0
0
0
1 .8
0
0
1 .2
0
0
0
1 .0
1 .2
0
0
1 .0
0
0
0
0 .6
0 .2
0
0
1 .6
0 .6
0
0 .4
0 

C1 0
0


0  C2 0


0  C 3 0

0  C 4 0

0  C 5 1

0  C 6 0

0 .4  C 7  0


C 8  0
0

1 
0
0
0
0
0
0
0
1
0
0
0
0
1
1
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
C 10 

0

0 
0 

0 
0 
G.J. Hwang
84
0

0

0

0
0

0
0

0 
Generate learning guidance
IF
THEN
IF
THEN
IF
THEN
8. 模糊推論
Learning_Status (Si, Cj) is Poorly-learned
Arrange for Student Si to re-learn the unit
containing Concept Cj
Learning_Status (Si, Cj) is Partially-learned
Arrange more practice concerning Concept Cj for
Student Si
Learning_Status (Si, Cj) is Well-learned
Record that Student Si has passed the study of
Concept Cj
G.J. Hwang
85
Membership functions for
Learning Status
Well-Learned
Poorly-Learned
Learning_status (Si, Cj)
1.0
PartiallyLearned
0
8. 模糊推論
0.5
1.0
Error_degree (Si, Cj)
G.J. Hwang
86
Learning guidance generated by ITED
8. 模糊推論
G.J. Hwang
87
Case Study: 網路學習行為分析
– 學習效率(Efficiency of Learning)
– 學習意願(Willingness)
– 耐心度(Patience)
– 專心度(Concentration)
– 閒置(Idleness)
– 理解度(Comprehension)
– 聊天(Chat)
8. 模糊推論
G.J. Hwang
88
學習意願分析
•學生用心學習的意願
•分析依據:有效登入時間/登入時間
degree
low
1
模糊推理法則
high
average
If willingness is low
Then insert INT(T×0.5) corresponding
willingness frames.
0.8
0.6
0.4
If willingness is average
Then insert INT(T×0.25) corresponding
willingness frames
0.2
0
0
0.2
0.4
0.6
ELT/LT
8. 模糊推論
0.8
1
If willingness is high
Then keep the current status.
G.J. Hwang
89
專心度分析
•學生集中精神於瀏覽教材的程度
•分析依據:回應時間
模糊推理法則
degree
no response
low
high
1
0.8
If
concentration is low
Then insert a corresponding
concentration frame.
0.6
If
concentration is high
Then keep the current status.
0.4
0.2
0
0
0.25
0.5
0.75
1
If
concentration is noresponse
Then keep the current status.
RT
8. 模糊推論
G.J. Hwang
90
聊天狀態分析
•學生利用線上討論區來閒聊而不是討論課程
•分析依據:學習相關比率
degree
模糊推理法則
high
1
average
low
If chat is high
Then record this status and warn
the student.
0.8
0.6
If chat is average
Then keep the current status.
0.4
0.2
0
0
8. 模糊推論
0.2
0.4
LR
0.6
0.8
1
G.J. Hwang
If chat is low
Then keep the current status
91