sample_correlated_ieg_pair | R Documentation |
Sample a pair of graphs with specified edge probability and correlation between each pair of vertices.
sample_correlated_ieg_pair(
n,
p_mat,
c_mat,
ncore = n,
directed = FALSE,
loops = FALSE,
permutation = 1:n
)
sample_correlated_rdpg_pair(X, corr, ncore = nrow(X), ...)
n |
An integer. Number of total vertices for the sampled graphs. |
p_mat |
An |
c_mat |
An |
ncore |
An integer. Number of core vertices. |
directed |
Logical scalar, whether to generate directed graphs. |
loops |
Logical scalar, whether self-loops are allowed in the graph. |
permutation |
A numeric vector,permute second graph. |
X |
A matrix. Dot products matrix, each entry must be in open (0,1) interval. |
corr |
A number. The target Pearson correlation between the adjacency matrices of the generated graphs. It must be in open (0,1) interval. |
... |
Passed to |
sample_correlated_ieg_pair
returns two igraph objects named
graph1
and graph2
. If sample two graphs with junk vertices,
the first ncore
vertices are core vertices and the rest are junk
vertices.
sample_correlated_rdpg_pair
returns two igraph objects named
graph1
and graph2
that are sampled from random dot product
graphs model. If sample two graphs with junk vertices, the first
ncore
vertices are core vertices and the rest are junk vertices.
S. Young and E. Scheinerman (2007), Random Dot Product Graph Models for Social Networks. Proceedings of the 5th International Conference on Algorithms and Models for the Web-graph, pages 138-149.
F. Fang and D. Sussman and V. Lyzinski (2018), Tractable Graph Matching via Soft Seeding. https://arxiv.org/abs/1807.09299.
sample_correlated_gnp_pair
,
sample_correlated_sbm_pair
n <- 50
p_mat <- matrix(runif(n^2),n)
c_mat <- matrix(runif(n^2),n)
sample_correlated_ieg_pair(n,p_mat,c_mat,ncore=40)
## sample a pair of igraph objects from random dot
## product graphs model with dimension 3 and scale 8
n <- 50
xdim <- 3
scale <- 8
X <- matrix(rgamma(n*(xdim+1),scale,1),n,xdim+1)
X <- X/rowSums(X)
X <- X[,1:xdim]
sample_correlated_rdpg_pair(X,corr=0.5,ncore=40)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.