| Algorithm 1: Spectral Clustering Algorithm | |
|
Input: Dataset, number of clusters k, parameter σ and number of iterations Output: the set of k clusters /* Note the symbols of “” and “” represent comments in this algorithm. */ |
|
| 1 | Calculate the affinity matrix and define /* In which and are the original data points i and j, repctively. */ |
| 2 | If then the |
| 3 | The D is the diagonal degree matrix and computed with elements: Given a graph G with n input vertices, the Laplacian matrix |
| 4 | Find the k largest eigenvectors of the matrix L and |
| 5 | Generate matrix y by renormalizing each x row, |
| 6 | Minimize the distortion of each row Y to regard as the point in clustering term using any clustering algorithm, such as a distance-based clustering approach. |
| 7 | Finally, the original point is assigned to cluster j when the row of belongs to the cluster j. |
| 8 | return the set of k clusters and cluster centre. |