I forgot to mention that 'b' in np.random.randint(0, b, N) is the number of blocks. Thank you On Wed, Sep 27, 2017 at 8:27 AM, Snehal Shekatkar <snehalshekatkar@gmail.com
wrote:
Hello Tiago,
I am trying to generate a stochastic block model but with the degree-sequence preserved. I am fine even if the degree-distribution is preserved instead of the exact sequence. I tried the following:
def prob(a, b): if a == b : return 0.999 else: return 0.001
g, bm = gt.random_graph(N, lambda: 1 + np.random.poisson(5), model = "blockmodel-degree", directed = False, block_membership=np.random.randint(0, b, N), edge_probs = prob)
However, this generates an ER graph. What can I do to retain the block-structure?
Thank you -- Snehal M. Shekatkar Pune India
-- Snehal M. Shekatkar Pune India