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

get_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(num_blocks = 4) # Calculate entropy with random blocks get_entropy(net)
#> [1] 1282.678
# Run some MCMC sweeps net <- mcmc_sweep(net, num_sweeps = 25, variable_num_blocks = FALSE) # Entropy after sweeps get_entropy(net)
#> [1] 1240.833