est.LG {graphon} | R Documentation |
Estimate graphons based on empirical degrees
Description
est.LG
takes a 2-stage approach. First it adopts largest gap criterion on empirical degrees to
estimate blocks of a given network under Stochastic Blockmodel framework.
Then a consistent histogram estimator is utilized to estimate graphons based on
estimated blocks in a given network.
Usage
est.LG(A, K = 2)
Arguments
A |
an |
K |
the number of blocks provided by an user. |
Value
a named list containing
- H
a
matrix of 3D histogram.
- P
an
corresponding probability matrix.
- B
a length-
list where each element is a vector of nodes/indices for each cluster.
References
Channarond A, Daudin J, Robin S (2011). “Classification and estimation in the Stochastic Block Model based on the empirical degrees.” ArXiv e-prints. 1110.6517.
Chan SH, Airoldi EM (2014). “A Consistent Histogram Estimator for Exchangeable Graph Models.” In Proceedings of the 31st International Conference on International Conference on Machine Learning - Volume 32, ICML'14, I-208–I-216.
See Also
Examples
## generate a graphon of type No.5 with 3 clusters
W = gmodel.preset(3,id=10)
## create a probability matrix for 20 nodes
graphW = gmodel.block(W,n=20)
P = graphW$P
## draw 23 observations from a given probability matrix
A = gmodel.P(P,rep=23,symmetric.out=TRUE)
## run LG algorithm with a rough guess for K=2,3,4
res2 = est.LG(A,K=2)
res3 = est.LG(A,K=3)
res4 = est.LG(A,K=4)
## compare true probability matrix and estimated ones
opar = par(no.readonly=TRUE)
par(mfrow=c(2,2), pty="s")
image(P, main="original P matrix")
image(res2$P, main="LG with K=2")
image(res3$P, main="LG with K=3")
image(res4$P, main="LG with K=4")
par(opar)