python-igraph icon indicating copy to clipboard operation
python-igraph copied to clipboard

Added Stochastic Variability in Community Detection Algorithms

Open SKG24 opened this issue 10 months ago • 7 comments

Used Chatgpt for understanding the functions and theory around the mathematical process.

  • [x] By submitting this pull request, I assign the copyright of my contribution to The igraph development team.

At first run: Screenshot 2025-03-26 at 9 25 41 PM

At second run: Screenshot 2025-03-26 at 9 27 55 PM

This supports stochastic method might give wildly different answers on a network without any significant community structure, while it gives consistent answers on one that has obvious communities.

Since the number of iterations is set to 50, even in structured graphs, slight variations in similarity scores may be observed.

SKG24 avatar Mar 26 '25 16:03 SKG24

I won't have time to look in detail today, but I checked whether the docs build with this change, and unfortunately they do not. Can you please check if you can fix this? You can build the docs using scripts/mkdoc.sh -c.

szhorvat avatar Mar 26 '25 20:03 szhorvat

Screenshot 2025-03-27 at 9 56 39 AM

Issue Description: The script mkdoc.sh -c fails with the following error:

AttributeError: module 'igraph' has no attribute '_igraph'. Did you mean: 'Graph'? This issue is persistent even after:

  • Reinstalling python-igraph
  • Passing clustering objects instead of membership lists in compare_communities()
  • Ensuring the same code works in Google Colab

SKG24 avatar Mar 27 '25 04:03 SKG24

I think I've fixed the build issue in the main branch; please try again and let me know if it still doesn't work.

ntamas avatar Mar 27 '25 13:03 ntamas

Thank you! It worked.

https://github.com/user-attachments/assets/6d983690-110c-4822-930f-910a89554453

SKG24 avatar Mar 27 '25 16:03 SKG24

I have made the suggested changes.

https://github.com/user-attachments/assets/bb7f31e7-debd-4b40-b63b-a0d233d9272e

SKG24 avatar Mar 28 '25 10:03 SKG24

This is a nice illustration!

I left a few comments for improvement.

Please remove changes to the sg_execution_times.rst file. This file was likely committed by accident, and I think we should remove it (but not as part of this PR).

Should I directly delete this file from PR through files changed section?

SKG24 avatar Apr 01 '25 07:04 SKG24

Should I directly delete this file from PR through files changed section?

Yes, that would be fine.

szhorvat avatar Apr 01 '25 21:04 szhorvat

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 20 '25 00:07 stale[bot]

Continued in #840. I can't push to this as the work was done on the main branch instead of a separate branch.

szhorvat avatar Jul 20 '25 05:07 szhorvat