I am trying to generate random graphs of social network data using the erdos.renyi.game function. I have specified the requirements using:
random.graph ← erdos.renyi.game(25, 15, type=“gnm”)
If I understand the function correctly, 25 is the number of nodes, and 15 should be the density of edges. However, the density of my randomized graphs are approximately 0.05.
If I’m not mistaken the function should choose edges approximately close to 15?
Does anyone know how I can force the erdos.renyi function to use the given edge density?