Skip to contents

Formula: DP prior on community labels; Bernoulli edges

Usage

Dpsbm(adjacency, alpha = 1, n_iter = 30, seed = 42)

Arguments

adjacency

An n x n symmetric 0/1 adjacency matrix; the diagonal is ignored.

alpha

Concentration, strictly positive.

n_iter

Number of sweeps.

seed

Seed of the deterministic stream.

Value

List with estimate (number of blocks), z, counts, n_blocks, log_likelihood, n, method.

Details

The block-to-block edge probabilities carry independent Beta(1,1) priors and are integrated out, so a block pair (r, s) with e edges out of t possible contributes B(1 + e, 1 + t - e) to the collapsed likelihood. A node is then reassigned by the CRP prior times the change in that likelihood, with the number of blocks learned rather than fixed.

References

Kemp, Tenenbaum, Griffiths, Yamada & Ueda (2006), AAAI-06:381-388.

Examples

Dpsbm(adjacency = 5L)
#> $estimate
#> [1] 1
#> 
#> $z
#> [1] 0
#> 
#> $counts
#> [1] 1
#> 
#> $n_blocks
#> [1] 1
#> 
#> $log_likelihood
#> [1] 0
#> 
#> $n
#> [1] 1
#> 
#> $method
#> [1] "Dirichlet-process stochastic block model"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"