Ranking nodes in bipartite networks with efficiency and flexibility
Bipartite (two-mode) networks are ubiquitous. When calculating node centrality measures in bipartite networks, a common approach is to apply PageRank on the one-mode projection of the network. However, the projection can cause information loss and distort the network topology. For better node ranking on bipartite networks, it is preferable to use a ranking algorithm that fully accounts for the topology of both modes of the network.
We present the BiRank package, which implements bipartite ranking algorithms HITS, CoHITS, BGRM, and Birank. BiRank provides convenience options for incorporating node-level weights into rank estimations, allowing maximum flexibility for different purpose. It can efficiently handle networks with millions of nodes on a single midrange server. Both R and Python versions.
birankpy provides functions for estimating various rank measures of nodes in bipartite networks including HITS, CoHITS, BGRM, and Birank.
It can also project two-mode networks to one-mode, and estimat PageRank on it.
birankpy allows user-defined edge weights.
Implemented with sparse matrix, it's highly efficient.
Let's pretend we have a edge list
edgelist_df containing ties between top nodes and bottom nodes:
To performing BiRank on, just:
bn = birankpy.BipartiteNetwork() bn.set_edgelist(edgelist_df, top_col='top_node', bottom_col='bottom_node') top_birank_df, bottom_birank_df = bn.generate_birank()
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size birankpy-1.0.0-py3-none-any.whl (6.1 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size birankpy-1.0.0.tar.gz (6.7 kB)||File type Source||Python version None||Upload date||Hashes View|