platers / MAL-Map

Cluster and visualize relationships between anime on MyAnimeList
https://www.malmap.net/
232 stars 14 forks source link

Advanced Clustering: Centrality and Node Roles #15

Closed BradKML closed 2 years ago

BradKML commented 2 years ago

If you want to measure the significance of a node, centrality will be useful. See more at https://github.com/networkx/networkx/issues/4973 Generally this can be output as a Dictionary (Key-Value pairs) of nodes and scores.

For Node Roles, there are multiple ways to go about it (other than https://github.com/benedekrozemberczki/karateclub)

Use cases:

BasLaa commented 2 years ago

I think that adding some of the algorithms you mentioned in #4973 would be very useful. Especially since I've been coming across them in a university project. I believe Leverage Centrality was already implemented by someone a while ago, but the others were never actually done? If so, I'm gunna work on that this week.

BradKML commented 2 years ago

@BasLaa would you insist on a JS-based implementation? That would be exteremely useful!

BasLaa commented 2 years ago

@BrandonKMLee I'm confused, why a JavaScript based implementation? I just meant implementing the algorithms in Python in NetworkX.

BradKML commented 2 years ago

@BasLaa that is because ultimately this is a JS app, and moving data from NetworkX to MAL-Map (as a Python to JS issue) is still kind of fuzzy at the edges.

BasLaa commented 2 years ago

@BrandonKMLee I see that I haven't paid close attention. I came to this issue from some link on the NetworkX github page, not realising this was something different... I have very little experience with JS, so I don't think I'm the right person for this job. I can implement them in Python in NetworkX though. Sorry about that!

BradKML commented 2 years ago

@BasLaa thanks for wanting to help out with NetworkX centrality! This is always needed for more universal functions. The MAL-Map connection can be handled later.

platers commented 2 years ago

I've now fully migrated to cdlib using the infomap algorithm. Infomap is the only one that worked at all for some reason. Anyway it works great, was getting inconsistent clusters before.