Skip to main content

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()

Metadata

Release files for birankpy 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for birankpy 1.0.1
File Size Uploaded
birankpy-1.0.1.tar.gz 7.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for birankpy 1.0.1
File Interpreter ABI Platform
birankpy-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 13.8 kB

Release files / birankpy-1.0.1.tar.gz

Download URL birankpy-1.0.1.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4eecd80e290868ba10c12a280c003cbff55244df5c566e94997fc87cc5819336
BLAKE2b-256 checksum
How to use checksums
45903476e8bca8c6bed9fd4c943fc319299b9fd5ca5085fb6731d6c86e41a077
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

Release files / birankpy-1.0.1-py3-none-any.whl

Download URL birankpy-1.0.1-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
572579522b410e1ba4db33568b0af5c6e3bc74fc537ce0a18717214c1acafb1e
BLAKE2b-256 checksum
How to use checksums
706b755ef261820938042d1214e8ff0f8785118c18a86a46b45bd13152433c12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.1.1

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page