Description Usage Arguments Examples
Generates a realization Stochastic Block Model with information for supervised labels.
1 | makeSBM(n, m, Lam)
|
n |
vector of unsupervised block sizes |
m |
vector of supervised block sizes |
Lam |
interblock link probability matrix |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | library(ssClust)
numVert=500 #number of ambiguous vertices
#matching Li's simulation parameters
rho <- c(0.4,0.3,.3)
B1 <- matrix(c(0.5,0.3,.4,
0.3,0.8,.6,
.4,0.6, .3), nrow = 3,ncol=3)
B2 <- matrix(.5 ,nrow = 3,ncol=3)
nu = .3
Lam0 = nu*B1 + (1-nu)*B2
n0 <- numVert*rho
m0<-c(20, 0, 0)
numburn0 = 10^4
numsample0 = 10^4
sbm.out = makeSBM(n0,m0,Lam0)
A0 = as.matrix(sbm.out$A)
observe0 = sbm.out$observe
truth0 = sbm.out$truth
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.