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

Identify clusters of nodes #203

Open
mhmism opened this issue Dec 2, 2020 · 3 comments
Open

Identify clusters of nodes #203

mhmism opened this issue Dec 2, 2020 · 3 comments

Comments

@mhmism
Copy link

mhmism commented Dec 2, 2020

Hello,

Thanks a lot for this wonderful mapper. I have been impressed by it so far.

Is there a way to automatically identify clusters of closely connected nodes within the TDA graph?
I have seen a few articles mentioning that they applied a Morse-clustering algorithm, but not sure how can apply it to the TDA graphs by KeplerMapper.

Any guidance in this direction will be extremely appreciated.

@sauln
Copy link
Member

sauln commented Dec 2, 2020

Hi @mhmism, you should be able to use any graph clustering method you'd like. For one example, you could convert the resulting graph to networkx format (using the networkx adapter), and then using sklearn's spectralclustering algorithm for your clustering.

I'm sure there are some kinks to work out around edge lengths, but this approach should work.

@mhmism
Copy link
Author

mhmism commented Dec 4, 2020

Many thanks for your reply! this is really helpful.

Since I'm using spectral clustering already in my TDA analysis. I'm not sure if it will make sense for me to use it again for modularity detection.

I'm considering using the Louvain algorithm, https://python-louvain.readthedocs.io/en/latest/
What do you think?

Kind regards
Mahmoud

@sauln
Copy link
Member

sauln commented Dec 4, 2020

🤷 I'm not familiar with Louvain, but from a cursory glance at the page it seems like it would work.

fwiw, I can't think of any problem with using spectral clustering twice.

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