Professional Documents
Culture Documents
Week 3
Course Name: Fuzzy logic and Neural Networks
Faculty Name: Prof. D. K. Pratihar
Department : Mechanical Engineering
Topic
Lecture 03: Applications of Fuzzy Sets (Contd..)
Hierarchical Fuzzy Logic Controller
Let us assume that a process having n inputs (I1,I2,……In) and
one output (that is, O) is to be modeled using an FLC
Let us also assume that m linguistic terms (fuzzy sets)
are used to represent each variable.
f
O f I 1 I 1 , I 2 f I 1 , I 2 I 1
I 1 I1 , I 2
Where I1 lies between I1 and I1+δI1
f
If 1,then δO > δI1
I 1
C
s.t. ij 1.0
j 1
LagrangeMultiplier
C N N C
F ( , C , 1, ......., N ) j 1 i 1
g
ij d 2
ij i ( ij 1.0)
i 1 j 1
dF dF dF dF
0; 0; 0;............; 0
d dC d 1 d N
Fuzzy C-Means Clustering
ij xi
g
CC j i 1
N
ij
g
i 1
1
ij 2
C d ij g 1
m 1
im
d
•An iterative algorithm, in which the cluster centers
and membership values of the data points with the
clusters are updated to minimize the dissimilarity
measure
Steps of FCM Algorithm
• Step 1: Assume the number of clusters to be made, that is, C
2≤C≤N
N
g
ij x ik
i 1
CC jk N
g
ij
i 1
1
ij 2
C d ij g 1, if dij > 0
m 1
d im
= 1.0, if dij = 0
i1 x i1
g
A
CC11 i 1
N
,
B
i1
g
i 1
where
A 0.6805511.25 0.2 0.4951501.25 0.4 0.8218971.25 0.8
0.3037951.25 0.9 0.333966 1.25
0.6 0.431538
1.25
0. 3
0.4153841.25
0.7 0.509643 1.25
0.2 0.469850
1.25
0. 3
0.1891641.25
0.8
1.912120
B 0.6805511.25 0.4951501.25 0.8218971.25
0.303795 0.333966 0.431538
1.25 1.25 1.25
0.189164
1.25
3.923066
A 1.912120
Therefore, CC11 0.487404
B 3.923066
0.293221526
0.380105056
1
11 8
0.888564, as g 1.25
d11
1
d12
Other elements of [ ] can be determined as follows:
0.888564 0.111436
0.909207 0.090793
0.376533 0.623467
0.142926 0.857074
0.217307 0.782693
0.922229 0.077771
0.060962 0.939038
0.562085 0.437915
0.788303 0.211697
0.232446 0.767554
It completes one iteration of the algorithm.
After few iterations, we get Cluster-centers
x
L 2
d ij ik x jk
k 1
•Step 3: Determine the similarity Sij between two
data points i and j
d ij
S ij e ,
1 N N
d ij d N d ij
C2 i 1 j i
We get ln 2
d
E S log 2 S 1 S log 2 1 S
Ei
ji
j x
S ij
log 2 S ij 1 S ij log 2 1 S ij
Clustering Algorithm
• Step 1: Calculate entropy Ei for each data point xi
lying in [T]
𝒅𝒋𝒊 =𝒅𝒊𝒋
and
σ 𝒅𝒊𝒋
ഥ=
𝒅 = 𝟎. 𝟓𝟏𝟖𝟑𝟕𝟑
𝟒𝟓
𝒍𝒏 𝟐
𝜶= = 𝟏. 𝟑𝟑𝟕𝟏𝟔𝟎
ഥ
𝒅
𝑺𝒊𝒋 = 𝒆−𝜶𝒅𝒊𝒋
Euclidean distance and similarity values are calculated, as shown
in the table.
Entropy of i-th data point
𝒋≠𝒊
𝑬𝟎 = 𝟖. 𝟐𝟖𝟓𝟒𝟓𝟔; 𝑬𝟏 = 𝟖. 𝟔𝟔𝟓𝟔𝟒𝟎
𝑬𝟐 = 𝟖. 𝟖𝟏𝟓𝟓𝟏𝟐; 𝑬𝟑 = 𝟖. 𝟓𝟔𝟖𝟓𝟑𝟕
𝑬𝟒 = 𝟖. 𝟓𝟏𝟔𝟗𝟎𝟎; 𝑬𝟓 = 𝟖. 𝟑𝟒𝟖𝟓𝟓𝟎
𝑬𝟔 = 𝟖. 𝟒𝟗𝟎𝟕𝟒𝟑; 𝑬𝟕 = 𝟖. 𝟔𝟖𝟔𝟒𝟐𝟎
𝑬𝟖 = 𝟖. 𝟓𝟔𝟎𝟐𝟏𝟕; 𝑬𝟗 = 𝟖. 𝟔𝟑𝟐𝟔𝟑𝟒
0-th point has the least entropy value, and it is to be the first
cluster center.
1-st, 4-th, 5-th, 7-th and 8-th are found to make cluster with the
0-th point.
Remaining points are : 2-nd, 3-rd, 6-th, 9-th
Out of these four points, the 6-th point is seen to have the least
values of entropy.
7 5 2
8 0 6
1 3
4 9