Draw a random graph from a stochastic blockmodel using a k-vector of block sizes and a k x k preference matrix
## S3 method for class 'sbm' generate_graph(params)
a list containing block.sizes, pref.matrix, and optionally block.names
This routine is agnostic about the algorithm that was used to produce the preference matrix and the block sizes, so it could potentially be used with a lot of different models.
igraph object that gets returned is a graph drawn from
the stochastic block-model. The vertices each have a 'group' attribute
containing the name of the block they have been assigned to. These block
names default to 'group.1', 'group.2', ... if none are specified.
igraph object with each vertex's group membership
given by a vertex attribute
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.