Returns the number of blocks/clusters in the current model state.
n_blocks(sbm)
| sbm | Object of class |
|---|
Number of clusters in current model state
Other modeling:
choose_best_collapse_state(),
collapse_blocks(),
collapse_run(),
entropy(),
interblock_edge_counts(),
mcmc_sweep(),
state()
# 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) n_blocks(net)#> [1] 0#> [1] 2#> [1] 2