use rustworkx instead of networkx except the plotting - #1252
Open
selmanozleyen wants to merge 3 commits into
Open
use rustworkx instead of networkx except the plotting#1252selmanozleyen wants to merge 3 commits into
selmanozleyen wants to merge 3 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1252 +/- ##
==========================================
- Coverage 77.24% 77.11% -0.13%
==========================================
Files 63 63
Lines 9378 9418 +40
Branches 1579 1585 +6
==========================================
+ Hits 7244 7263 +19
- Misses 1532 1554 +22
+ Partials 602 601 -1
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is part of my larger goal to replace process based parallelization. I found rustworkx easy to install and fast. That's why I made a PR long ago.
This pull request migrates the group centrality computation in
centrality_scoresfrom NetworkX to the high-performancerustworkxlibrary, and introduces a custom, Numba-accelerated clustering coefficient kernel. It also ensures that the results remain numerically consistent with the previous implementation by adding parity tests. The main changes are as follows:Dependency and Documentation Updates:
rustworkx>=0.18.0as a dependency inpyproject.tomland included a corresponding citation inreferences.bib. [1] [2]rustworkxfor group centrality measures and clarified citations for bothrustworkxandnetworkx. [1] [2]Core Implementation Changes:
centrality_scoreswithrustworkxequivalents, and replaced the clustering coefficient computation with a custom, parallelized Numba kernel for improved performance. [1] [2]_build_graphutility to convert connectivity matrices into bothrustworkx.PyGraphand a CSR matrix for use in centrality and clustering calculations.Testing:
rustworkx/Numba implementation and the original NetworkX-based results for all group centrality measures.