Comments (3)
Thank you for your quick and useful answer @bdpedigo! I'll look further into the methods you suggest.
from graspologic.
Absolutely - if it's alright with you I'm going to close this issue since I don't think there's anything to be done in terms of graspologic, but please feel free to post any further questions here.
from graspologic.
Hi @johandahlberg - unfortunately, this is a known issue with Leiden as well as other modularity maximization methods. These methods aren't doing model selection, and aren't good at "knowing" when the community structure they find is significant or would be expected under a random model as you point out. See for instance in this image of an adjacency matrix after sorting by the partition inferred by Leiden (from https://bdpedigo.github.io/networks-course/community_detection.html#overfitting):
You'll notice that those "communities" actually do have more within-community connections than without, so these structures can actually pop up just by chance.
One option is to explicitly form a null distribution (say, sampling a few hundred ER graphs, running Leiden, and computing the modularity) and then comparing your results to such a distribution.
Zhang and Peixoto also wrote this nice article about this problem https://journals.aps.org/prresearch/abstract/10.1103/PhysRevResearch.2.043271 and provide an alternative formulation that relies on a variant of the stochastic block model. Their implementation is in graph-tool here. The tradeoff is I'm guessing it's slower, might be harder to optimize, etc. but could be helpful for your application so I thought I'd mention it.
from graspologic.
Related Issues (20)
- [BUG] Error in `graph_match` with optimal transport HOT 10
- Ensure we have a non-dev-mode install of graspologic as part of CI/CD workflow
- Audit test warnings for deprecation warnings HOT 1
- [BUG] graspologic v.2.0.1 and networkx 3.0 incompatibility leads to a crash HOT 1
- [BUG] Following the first tutorial on the documentation, first example fails due to networkx HOT 2
- Add CITATION.cff file HOT 2
- MatplotlibDeprecationWarning to address
- Numpy DeprecationWarning to address HOT 1
- Sklearn FutureWarning to address
- [BUG] What does "Spectral Vertex Nomination" implement? HOT 1
- [BUG] graspologic takes 33 seconds to import HOT 9
- [BUG] The docs do not reflect the modification of the graph_match module HOT 1
- [BUG] Numba warnings
- The whole package works with numpy matrices; why doesn't node2vec? HOT 1
- [Question] coefficient magnitude, GCT HOT 5
- [BUG] SBMEstimator throws an error when "loops=False" and some block has size 1
- [Question] Is Windows 11 OS supported? HOT 1
- [BUG] Scipy deprecations causing importerrors in gensim HOT 4
- [MAINT] black formatting rules updated in 2024 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graspologic.