qbiocode.apps.quvine.walks.rwr module#

Summary#

Functions:

generate_RWR_pagerank_walks

get_RWR_pagerank_scores

Random Walk with Restart using PageRank.

Reference#

get_RWR_pagerank_scores(G, root, restart_prob=0.15, view_nodes=None, weight=None, tol=1e-06, max_iter=500)[source]#

Random Walk with Restart using PageRank.

Parameters:
  • G (networkx.Graph)

  • root (node) – Restart node

  • restart_prob (float) – Alpha (restart probability)

  • view_nodes (set or None) – Optional constraint: restrict graph to these nodes

  • weight (str or None) – Edge weight attribute

  • tol (float) – Convergence tolerance

  • max_iter (int) – Max iterations

Returns:

Node -> RWR stationary probability

Return type:

dict

generate_RWR_pagerank_walks(G, root, view_nodes=None, num_walks=10, walk_length=6, restart_prob=0.5, max_iter=100, rng=None)[source]#