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