Skip to main content
. 2021 Feb 16;18(4):1890. doi: 10.3390/ijerph18041890
Algorithm 1: Weighted fuzzy c-means clustering algorithm
Begin
Step 1:
---Initialization.
X, c, ε > 0, W
Step 2:
---Randomly select V cluster centers.
2 ≤ c ≤ N
Step 3:
---Choose an appropriate level of cluster fuzzinessf.
f [1, ∞], f > 1
Step 4:
---Choose an appropriate membership matrix U with size N × c × M
Uijm ∈ [0, 1] and j=1cUijm = 1 for a fixed value of m
Step 5:
---Calculate the cluster centers.
Repeat for jth cluster and its mth dimension
CCjm = i=1NUijmf xim wmi+1NUijmf
Step 6:
---Calculate the Euclidean distance
Dijm = (xim wm CCjm )
Step 7:
---Update fuzzy membership matrix U according to Dijm
Uijm = 1c=1C(DijmDicm)2f  1
Step 8:
Until U ≤ ε
End.