GithubHelp home page GithubHelp logo

Comments (3)

johandahlberg avatar johandahlberg commented on June 11, 2024 1

Thank you for your quick and useful answer @bdpedigo! I'll look further into the methods you suggest.

from graspologic.

bdpedigo avatar bdpedigo commented on June 11, 2024 1

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.

bdpedigo avatar bdpedigo commented on June 11, 2024

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):

image

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.