jerpelhan / DAVE

MIT License
34 stars 3 forks source link

Number of Clusters as the Max Eigenvalue? #16

Open jwahnn opened 3 weeks ago

jwahnn commented 3 weeks ago

Hi, is there a particular reason as to why you are setting the max(k) to be the number of clusters for SpectralClustering towards the end of the Verification Stage in the dave.py file?

jerpelhan commented 2 weeks ago

In our work, we use spectral clustering in combination with the eigengap heuristic, see here. Overview:

  1. Laplacian Matrix: Compute the graph Laplacian L = D - W, where D is the degree matrix and W is the adjacency matrix.

  2. Eigen Decomposition: Perform eigen decomposition on L to obtain eigenvalues and eigenvectors.

  3. Eigengap Heuristic: Determine the number of clusters by finding the largest gap between consecutive eigenvalues.

We modify the eigengap heuristic to set the number of clusters to match the last large enough eigengap.