문제

I have installed networkx and matplotlib packages. How can I generate a power law graph based on degree correlation i.e. graphs with high or low degree of homophily

도움이 되었습니까?

해결책

Have you looked at the examples on the Networkx site? This example might help you get started with this.

There are also a number of functions within Networkx which generate random graphs which will probably be helpful. Have a look for the random_powerlaw_tree(....) function detailed in the graph generators section of the documentation.

다른 팁

networkx.generators.barabasi_albert_graph will generate a graph according to the Barabasi-Albert model, which will have a power-law degree distribution.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top