-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The addition of DomiRank centrality to Networkx #7443
base: main
Are you sure you want to change the base?
Conversation
This looks cool! I don't have the familiarity with the codebase required to judge whether this is an appropriate enhancement, but I wanted to say you should add |
Co-authored-by: Gilles Peiffer <gilles.peiffer@student.uclouvain.be>
Hello! Thank you for your response! I will look into it and try to fix some of the CI errors. Thank you for your help. Perhaps, with this and your continued support, we can make this have 0 CI errors! I saw your commit, and you are right, it was for path(5), good catch! Best, |
…workx into DomiRank-centrality-addition
Adding |
I have committed the suggested changes to the pull request. Lets see how it fares on the CI errors! Thanks again. This would really help my work, and it is also something that has been requested by numerous users / people. I can see it failed without scipy, which makes sense as I only have an implementaiton with Scipy. Is this an issue, as I can create a non-scipy dependent implementation as well? I will also implement some test functions ASAP. I have a busy week but I will try and get it done! Best, |
Hello all,
This contribution implements DomiRank centrality to networkx using scipy.sparse.csr_arrays, providing both an analytical and iterative solution (using Newton iteration). It would be great to have the addition of DomiRank as a centrality measure in networkx, as this has been requested to me a couple of times.
DomiRank centrality is a new metric that quantifies the dominance of nodes in their neighborhoods, where, the tunable competition parameter$\sigma$ provides a trade-off between the amount of local and global topological information considered. By setting $\sigma$ very large, you are finding the most 'dominant' nodes with respect to the entire system, and by setting $\sigma \to 0$ , you are converging to degree centrality - i.e. only local information.
The paper that introduces domirank is hereunder:
Engsig, M., Tejedor, A., Moreno, Y. et al. DomiRank Centrality reveals structural fragility of complex networks via node dominance. Nat Commun 15, 56 (2024). https://doi.org/10.1038/s41467-023-44257-0
I would like to apologize in advance if I am not following the contribution standards 100%, this is my first time, and if there are additional things i need to do before this can be contributed, just let me know, and I will do it as soon as possible!
Also, there are some additional things to add - e.g. finding the optimal value of$\sigma$ for largest-connected-component deterioration with node removals. I already have this in DomiRank repository, however, lets start with just the non-automated DomiRank... first things first!
https://github.com/mengsig/DomiRank
Best,
Marcus