question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Louvain clustering on weighted network?

See original GitHub issue

I’m looking at network based clustering for single cell data, and was wondering about the louvain implementation used here. Is there a reason scanpy doesn’t currently allow clustering on a weighted network (like that generated by sc.pp.neighbors(adata, knn=False, method="gauss"))? It’s my impression that this would be more similar to the cited Phenograph method.

I’d be interested in adding that functionality (and have a proof of concept on my fork), but wanted to hear if there was a reason this wasn’t implemented currently first.

Thanks for any input!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:17 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
ivirshupcommented, Aug 29, 2018

I’d agree with your statement that engineering the representation is more important than the analysis. I view my goal here as allowing more representations as input. Would you mind saying more about why you thing using different metics is less clean (simple?)? I would think that would depend on what representation you’re calculating the distances on.

1reaction
fidelramcommented, Aug 27, 2018

@LuckyMD I changed the resolution of the method and I find that the weighted version produces results that are different. In other words, the difference in the clustering does not seem to come from differences in the resolution parameter.

Here is an example. In both cases, 13 clusters are found; however only the weighted version can identify the small cluster No. 13:

image

Increasing the resolution of the non-weighted method eventually discerns the small cluster 13

I would vote to add the modifications from @ivirshup

Read more comments on GitHub >

github_iconTop Results From Across the Web

Louvain clustering on weighted network? · Issue #240 - GitHub
I'm looking at network based clustering for single cell data, and was wondering about the louvain implementation used here.
Read more >
Effect of weights on the Louvain communities detected
In case of a weighted graph would it be valid to assume that an edge with a higher weight would be prioritized to...
Read more >
louvain community detection in complete weighted networks ...
I am using python-louvain implementation to detect community in complete weighted graph. But I only get one partition, containing all nodes.
Read more >
Louvain method - Wikipedia
The Louvain method for community detection is a method to extract communities from large networks created by Blondel et al. from the University...
Read more >
Louvain - Neo4j Graph Data Science
3.6. Weighted. The Louvain algorithm can also run on weighted graphs, taking the given relationship weights into concern when calculating the modularity.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found