Computes the (degree-corrected) entropy for the network at the node level.

entropy(sbm)

Arguments

sbm

sbm_network object as created by new_sbm_network.

Value

Entropy value (numeric).

See also

Examples

set.seed(42) # Start with a small simulated network with random block assignments net <- sim_basic_block_network(n_blocks = 4, n_nodes_per_block = 15) %>% initialize_blocks(n_blocks = 4) # Calculate entropy with random blocks entropy(net)
#> [1] 1285.001
# Run some MCMC sweeps net <- mcmc_sweep(net, num_sweeps = 25, variable_n_blocks = FALSE) # Entropy after sweeps entropy(net)
#> [1] 1243.098