sample_sbm: Sample graphs pair from stochastic block model

sample_correlated_sbm_pairR Documentation

Sample graphs pair from stochastic block model

Description

Sample a pair of random graphs from stochastic block model with correlation between two graphs being corr and edge probability being p.

Usage

sample_correlated_sbm_pair(
  n,
  pref.matrix,
  block.sizes,
  corr,
  core.block.sizes = NULL,
  permutation = 1:n,
  ...
)

Arguments

n

An integer. Number of vertices in the graph.

pref.matrix

The matrix giving the Bernoulli rates. This is a K-by-K matrix, where k is the number of groups. The probability of creating an edge between vertices from groups i and j is given by element i,j. For undirected graphs, this matrix must be symmetric.

block.sizes

A numeric vector. Give the number of vertices in each group. The sum of the vector must match the number of vertices.

corr

A number. The target Pearson correlation between the adjacency matrices of the generated graphs. It must be in open (0,1) interval.

core.block.sizes

A numeric vector. Give the number of core vertices in each group. Entries should be smaller than block.sizes and the vector length should be the same as block.sizes.

permutation

A numeric vector, permute second graph.

...

Passed to sample_sbm.

Value

Returns a list of two igraph object, named graph1 and graph2. If sample two graphs with junk vertices, in each corresponding block the first core.block.sizes vertices are core vertices and the rest are junk vertices.

References

P. Holland and K. Laskey and S. Leinhardt (1983), Stochastic Blockmodels: First Steps. Social Networks, pages 109-137.

F. Fang and D. Sussman and V. Lyzinski (2018), Tractable Graph Matching via Soft Seeding. https://arxiv.org/abs/1807.09299.

See Also

sample_correlated_gnp_pair, sample_correlated_rdpg_pair

Examples

pm <- cbind( c(.1, .001), c(.001, .05) )
sample_correlated_sbm_pair(n=1000, pref.matrix=pm, block.sizes=c(300,700), corr=0.5)
sample_correlated_sbm_pair(n=1000, pref.matrix=pm, block.sizes=c(300,700), corr=0.5,
core.block.sizes=c(200,500))


dpmcsuss/iGraphMatch documentation built on Feb. 15, 2024, 3:26 p.m.