Algorithm 1. FCM algorithm for cluster formation.

1

2

3

4

5

6

7

8

9

10

11

for i = 0 to N

for j = 0 to C

uij(0) ~ uniform(0.0, 1.0)

k ← 0

repeat

k ← k + 1

for j = 0 to C

update cluster centroid cj using Equation (4)

update U(k) using Equation (3)

until ||U(k) ? U(k-1)|| < ε