Skip to main content
. 2019 Jun 4;16(11):1988. doi: 10.3390/ijerph16111988
Algorithm 1: MDST-AP algorithm
 Input:
X={x1,x2,,xN} : Set of objects (dataset of multidimensional attributes)
σ: Gaussian kernel parameter (in Equation (8))
M : the number of cluster parameters P (in Equation (14))
 Output:
 C = {C1,C2,,CK} : Set of clusters (X is divided into k clusters)
  1. Let r(i,j)=0, a(i,j)=0    //responsibility and availability

  2. λ = 0.5       //the damping coefficient (0<λ<1)

  3. maxits = 1000    //maximum number of iterations

  4. Convits = 100     //continuous invariance times of clusters

  5. X= (X- X_mean)/X_std       //X is normalized to obtain a new dataset X by Z-score //normalization method

  6. For t = 1 to M    //the M clustering results are obtained and the best clusters are determined//by using the DB index

  7. SN×N = ComputeSimilarity(X)   //similarity matrix SN×N is calculated by Equation (1) and Equation (9)

  8. P = ComputPreference(SN×N, λ)  //preference P is optimized by Equation (14)

  9. If maxits <= 1000 and Convits <= 100 Then

  10. r(i,j) and a(i,j) are calculated by Equation (2) and Equation (3)

  11. else   //when clustering reaches 1000 iterations, or the cluster center continues 100 //unchanged the final clustering result is reached

  12. clusters = ComputeCluster(r + a, X)   //the cluster center is determined according to r + a

  13. DB_Index is calculated by Equation (15)

  14. End If

  15. End For