Description Usage Arguments Value Author(s) Examples
View source: R/stochastic_block_model.R
Generate a realization of the stochastic block model with non-overlapping blocks
1 2 |
n |
Number of nodes |
k |
Number of blocks. Default is 2 |
P |
k x k matrix where the (i,j)th entry specifies the probability of connection between community i and j |
sizes |
an array of length k where the ith entry specifies the size of the ith block. This must sum to n |
random.community.assignment |
logical specifying whether or not the labels are assigned randomly. If FALSE, labels are assigned in order starting with the upper left corner of the matrix. Default is FALSE |
vector |
logical specifying whether or not the returned adjacency matrix should be returned as a vector of edge variables. Default is FALSE |
a list containing the objects
Adjacency: either an adjacency matrix of the generated realization, or if vector == TRUE, an edgelist of the generated realization
Membership: a numeric vector specifying the community label of each vertex
James D. Wilson
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.