Skip to main content

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

birankpy-1.0.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

birankpy-1.0.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file birankpy-1.0.1.tar.gz.

File metadata

  • Download URL: birankpy-1.0.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for birankpy-1.0.1.tar.gz
Algorithm Hash digest
SHA256 4eecd80e290868ba10c12a280c003cbff55244df5c566e94997fc87cc5819336
MD5 b689078a5cbe9ef256c64f87ac9bd329
BLAKE2b-256 45903476e8bca8c6bed9fd4c943fc319299b9fd5ca5085fb6731d6c86e41a077

See more details on using hashes here.

File details

Details for the file birankpy-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: birankpy-1.0.1-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.6.1 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for birankpy-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 572579522b410e1ba4db33568b0af5c6e3bc74fc537ce0a18717214c1acafb1e
MD5 7b7493e88a34e0ea9e19b2584ca6f7bf
BLAKE2b-256 706b755ef261820938042d1214e8ff0f8785118c18a86a46b45bd13152433c12

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page