R/tools_generator.R
rmultsbm.Rd
rmultsbm
returns the multi-graph adjacency matrix and the cluster labels generated randomly with a Multinomial Stochastic Block Model.
rmultsbm(N, pi, mu, lambda)
The size of the graph to generate
A numeric vector of length K with clusters proportions (will be normalized to sum up to 1).
A numeric array of dim K x K x M with the connectivity pattern to generate. elements in [0,1].
A double with the Poisson intensity to generate the total counts
A list with fields:
x: the multi-graph adjacency matrix as an array
K: number of generated clusters
N: number of vertex
cl: vector of clusters labels
pi: clusters proportions
mu: connectivity matrix
lambda:
This function takes the desired graph size, cluster proportions and connectivity matrix as input and sample a graph accordingly together with the clusters labels.