Computes the (degree-corrected) entropy for the network at the node level.
entropy(sbm)
sbm |
|
---|
Entropy value (numeric).
Other modeling:
choose_best_collapse_state()
,
collapse_blocks()
,
collapse_run()
,
interblock_edge_counts()
,
mcmc_sweep()
,
n_blocks()
,
state()
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