Ranking nodes in bipartite networks with efficiency and flexibility
Project description
BiRankpy
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.
Overview
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.
Example
Let's pretend we have a edge list edgelist_df
containing ties between top nodes and bottom nodes:
top_node | bottom_node |
---|---|
1 | a |
1 | b |
2 | a |
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()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file birankpy-1.0.0.tar.gz
.
File metadata
- Download URL: birankpy-1.0.0.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/42.0.2.post20191201 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87b2f13463d1751af3833e0ee26cd5b5333d058967b82a6421a3907fd9e4bfe3 |
|
MD5 | 2a339eeb3465cda3545dfb6800ed4ac5 |
|
BLAKE2b-256 | 1fd1c79df74010afed4e5aabd41218ddd7e09849262377e756ce8839e95c03c6 |
File details
Details for the file birankpy-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: birankpy-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/42.0.2.post20191201 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fad7d19443386f653469ec33c7626d014dcb29b8e351e72c375056c8d8195a82 |
|
MD5 | b6c1a44a6f294772ff7efd84a9e0c87f |
|
BLAKE2b-256 | 7ad9f99da5c23fbebced9fa3a0b00a9a498dfe9ac18deeb225d38b76f305f7dc |