Returns the number of blocks/clusters in the currenet model state.
get_num_blocks(sbm)
| sbm | Object of class |
|---|
Number of clusters in current model state
Other modeling:
choose_best_collapse_state(),
collapse_blocks(),
collapse_run(),
get_block_edge_counts(),
get_entropy(),
get_state(),
mcmc_sweep()
# Small edge list to build network edges <- dplyr::tribble( ~from, ~to, "a1" , "b1" , "a1" , "b2" , "a1" , "b3" , "a2" , "b1" , "a2" , "b4" , "a3" , "b1" ) # A small simulated network with no blocks net <- new_sbm_network(edges) get_num_blocks(net)#> [1] 0#> [1] 2#> [1] 7