Compute the block sum of an adjacency matrix given a label vector.

estim_dcsbm(A, z)

Arguments

A

adjacency matrix.

z

label vector.

Value

A list of result

B

estimated connectivity matrix.

theta

estimated node propensity parameter.

Details

$$\hat B_{k\ell} = \frac{N_{k\ell}(\hat z)}{m_{k\ell} (\hat z)}, \quad \hat \theta_i = \frac{n_{\hat z_i}(\hat z) d_i}{\sum_{j : \hat z_j = \hat z_i} d_i}$$ where \(N_{k\ell}(\hat{z})\) is the sum of the elements of A in block \((k,\ell)\) specified by labels \(\hat z\), \(n_k(\hat z)\) is the number of nodes in community \(k\) according to \(\hat z\) and \(m_{k\ell}(\hat z) = n_k(\hat z) (n_\ell(\hat z) - 1\{k = \ell\})\)