Skip to main content
. 2022 Apr 19;22(9):3123. doi: 10.3390/s22093123
Algorithm 1 Similarity-Based User Clustering Algorithm
  • 1:

    Initialization: the number of UAV N; the similarity matrix Sim defined as in (9).

  • 2:

    Build the adjacency matrix W=Sim, and calculate the degree matrix D with diagonal element di=j=1Usimi,j.

  • 3:

    Calculate Laplace matrix L=DW.

  • 4:

    Calculate normalized Laplace graph matrix Lnorm=D1/2LD1/2.

  • 5:

    Pick a number of N eigenvalues of λ1λ2λN of Lnorm.

  • 6:

    Calculate the N smallest eigenvectors z1z2zN.

  • 7:

    Let the Z matrix have the eigenvectors z1,z2,,zN as columns.

  • 8:

    Use K-means clustering to cluster the rows of the matrix Z.

  • 9:

    Output: the division result of cluster Cc1,c2,cN.