Learn R Programming

nett (version 1.0.0)

fast_cpl: CPL algorithm for community detection (fast)

Description

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

Usage

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

Value

Estimated community label vector.

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

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

Run this code
head(fast_cpl(igraph::as_adj(polblogs), 2), 50)

Run the code above in your browser using DataLab