标签: python networkx pagerank
https://networkx.github.io/documentation/development/_modules/networkx/algorithms/link_analysis/pagerank_alg.html
我想计算加权个性化网页排名。我应该如何实现特定的起始节点? 代码:
import newtworkx as nx G = nx.DiGraph() [G.add_node(k) for k in [1,2,3,4]] G.add_edge(2,1) G.add_edge(3,1) G.add_edge(4,1) ppr1 = nx.pagerank(G,personalization={1:1, 2:1, 3:1, 4:1})
如何设置nstart和个性化?谢谢!