SpringRank is a method for ranking the nodes in a directed network or from a set of pairwise comparisons.
In this repo, we provide three implementations of the SpringRank model described in:
-  C. De Bacco, D. B. Larremore and C. Moore, A physical model for efficient ranking in networks, Science Advances, Vol 4, 7, eaar8260, 2018. Science Advances PDF. arXiv PDF and here.
If you use this code please cite .
python: Python code and a test script.
matlab: MATLAB code and a test script.
r: R code and a test script.
data: Contains sample adjacency files to test the code and a sample result.
Haskell: by Jon Zingale github.com/jonzingale/Haskell/.
Python: Fast Sparse alternative code by Larremore Lab on PyPI github.com/LarremoreLab/SpringRank
Need to make a directory called
data at the same level of the
To make one, just type from the command line, inside that folder:
The directed adjacency matrix should be formatted as an edge list with 3 columns:
node1 node2 3
The first and second columns are the source and target nodes of that edge, respectively; the third is the edge weigth (must be integer). In this example the edge node1 –> node2 exists with weight 3.
One file will be generated inside the
data folder containg the SpringRank scores ordered from highest to lowest. The output file will be inside
data folder with names:
networkname_SpringRank_a0.0_l0_1.0_l1_1.0.datfor the case
The first column is the node id, the second column is the SpringRank score.
Copyright (c) 2017 Caterina De Bacco and Daniel B Larremore
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.