Am 18.02.22 um 17:40 schrieb Davide Cittaro:
Hi all, given a SBM fit it should be possible to generate a random graph using 
the fitted model. As far as I understand this is done using 
gt.generate.generate_sbm() function. What about nested SBM instead? I guess 
generating a graph from blocks at level 0 doesn't work, is there a workaround 
for this?

The difference between the nested and non-nested SBMs is only their priors, not the actual model.

So indeed, when sampling from the nested model, all you need to do is to sample from the model at the lowest level.

There is a convenience function for this, which is:


   state.levels[0].sample_graph()


For non-nested model this is only:


   state.sample_graph()

These are just convenience wrappers for generate_sbm().

Best,
Tiago


--
Tiago de Paula Peixoto <ti...@skewed.de>
_______________________________________________
graph-tool mailing list -- graph-tool@skewed.de
To unsubscribe send an email to graph-tool-le...@skewed.de

Reply via email to