The Conditional Pseudo-Likelihood (CPL) algorithm for fitting degree-corrected block models

fast_cpl(Amat, K, ilabels = NULL, niter = 10)

Arguments

Amat

adjacency matrix of the network

K

desired number of communities

ilabels

initial label vector (if not provided, initial labels are estimated using spec_clust)

niter

number of iterations

Value

Estimated community label vector.

Details

The function implements the CPL algorithm as described in the paper below. It relies on the mixtools package for fitting a mixture of multinomials to a block compression of the adjacency matrix based on the estimated labels and then reiterates.

Technically, fast_cpl fits a stochastic block model (SBM) conditional on the observed node degrees,to account for the degree heterogeneity within communities that is not modeled well in SBM. CPL can also be used to effectively estimate the parameters of the degree-corrected block model (DCSBM).

The code is an adaptation of the original R code by Aiyou Chen with slight simplifications.

References

For more details, see Pseudo-likelihood methods for community detection in large sparse networks, A. A. Amini, A. Chen, P. J. Bickel, E. Levina, Annals of Statistics 2013, Vol. 41 (4), 2097—2122.

Examples

head(fast_cpl(igraph::as_adj(polblogs), 2), 50)
#> number of iterations= 10 
#> number of iterations= 6 
#> number of iterations= 8 
#> number of iterations= 8 
#> number of iterations= 8 
#> number of iterations= 8 
#> number of iterations= 8 
#> number of iterations= 8 
#> number of iterations= 8 
#> number of iterations= 8 
#>  [1] 1 1 2 2 2 1 2 1 1 1 2 1 1 1 1 1 1 1 2 1 1 1 1 1 2 1 1 1 1 2 1 1 2 2 1 1 2 1
#> [39] 2 1 1 1 1 2 1 1 1 2 2 2