Skip to main content
. 2023 Apr 19;23(8):4110. doi: 10.3390/s23084110
Algorithm 1: Pseudocode of the FCM algorithm
Set the fuzzy index m, iteration accuracy ε, and maximum category number cmax
for c=1,2,,cmax
    l=0
    Initialize VlRc×g and UlRc×N randomly
    while True
        l=l+1
        Update Ul with Equation (20)
        Update Vl with Equation (21)
        if [In Equation (22) is satisfied]
            break while
        end if
    end while
    U=Ul,V=Vl
    Calculate the clustering validity function Pc,U,V with Equation (23)
end for
Choose the optimal c(c*) with Equation (24)
return c* and the corresponding V,U