Parameters to let random_powerlaw_tree() generate trees with more than 10 nodes
To generate trees with more nodes it is only needed to increase the "number of tries" (parameter of random_powerlaw_tree). 100 tries is not enough even to have a tree with 11 nodes (it gives an error). For example, with 1000 tries I manage to generate trees with 100 nodes, using networkX 1.8.1 and python 3.4.0
I am trying to use one of the random graph-generators of NetworkX (version 1.8.1):
random_powerlaw_tree(n, gamma=3, seed=None, tries=100)
However, I always get this error
File "/Library/Python/2.7/site-packages/networkx/generators/random_graphs.py", line 840, in random_powerlaw_tree
"Exceeded max (%d) attempts for a valid tree sequence."%tries)
networkx.exception.NetworkXError: Exceeded max (100) attempts for a valid tree sequence.
for any n > 10, that is starting with
G = nx.random_powerlaw_tree(11)
I would like to generate trees with hundreds of nodes. Does anyone know how to correctly set these parameters in order to make it run correctly?