Skip to main content
. 2021 Aug 20;7:e679. doi: 10.7717/peerj-cs.679

Algorithm 1. ASC with GNG.

Input: Data points XRd, the number of clusters k
Output: A partition of given data points into k clusters C1,…,Ck
1: {Abstraction Level1}
2: Generate the network from the dataset X using GNG.
3: Calculate the similarity matrix ARM × M from the reference vectors and the topology of the network.
4: {Abstraction Level 2}
5: Calculate the normalized Laplacian matrix Lsym by Eq. (2).
6: Calculate the k first eigenvectors u1,…,uk of Lsym.
7: Let URM× k be the matrix containing the vectors u1,…,uk as columns.
8: For i = 1,…, M, let yiRk be the vector corresponding to the i-th row of U.
9: Assign (yi)i = 1,…,M to clusters C1,…,Ck by k-means.
10: {Assign data points to the clusters.}
11: Find the nearest unit to each data point.
12: Each data point is assigned to the cluster to which the nearest unit is assigned.