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-0.1.1.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: birankpy-0.1.1.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.4

File hashes

Hashes for birankpy-0.1.1.tar.gz
Algorithm Hash digest
SHA256 222d3590d50ec23b6cffc4d245b7d1d92ce6e4ae753bb622d88fb9476e5a0506
MD5 8c8fc015e9a6c54cc0f5194913364a0b
BLAKE2b-256 230a34a24c444d465a28c22a431ff755b5137df88772e023759004a6d1a52c14

See more details on using hashes here.

File details

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

File metadata

  • Download URL: birankpy-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.4

File hashes

Hashes for birankpy-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c4004b94f165f3e5cb27527197df46617cbb3e17eda1765e4c219da22b25cc7b
MD5 e2feee7e6b757e63c36324bc54373589
BLAKE2b-256 c4392e45afcd982f853eefa5eddf8828f2408081d370027d4d93b88a58bdea43

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