Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Number of Clusters as the Max Eigenvalue? #16

Open
jwahnn opened this issue Aug 26, 2024 · 1 comment
Open

Number of Clusters as the Max Eigenvalue? #16

jwahnn opened this issue Aug 26, 2024 · 1 comment

Comments

@jwahnn
Copy link

jwahnn commented Aug 26, 2024

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
Copy link
Owner

jerpelhan commented Sep 2, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants