Retrieves the dataframe recording the results of running either collapse_blocks or collapse_run on sbm_network object.

get_collapse_results(sbm)

Arguments

sbm

Object of class sbm_network.

Value

List with two dataframes. The first telling for all sweeps everytime a node was moved and what group it was moved to. The second telling for each sweep the entropy delta and total number of nodes that were moved to new groups in that sweep. If track_pairs = TRUE, then an additional pairing_counts dataframe is added to output.

Examples

# Start with a random network of two blocks with 25 nodes each and # run agglomerative clustering with no intermediate MCMC steps on network my_sbm <- sim_basic_block_network(n_blocks = 2, n_nodes_per_block = 25) %>% collapse_blocks(num_mcmc_sweeps = 0) # Look at the results of the collapse directly get_collapse_results(my_sbm)
#> # A tibble: 16 x 4 #> entropy entropy_delta num_blocks state #> <dbl> <dbl> <int> <list> #> 1 738. 85.4 40 <df[,4] [130 × 4]> #> 2 775. 36.3 35 <df[,4] [120 × 4]> #> 3 823. 48.6 28 <df[,4] [106 × 4]> #> 4 861. 37.9 23 <df[,4] [96 × 4]> #> 5 883. 22.3 19 <df[,4] [88 × 4]> #> 6 902. 19.0 16 <df[,4] [82 × 4]> #> 7 919. 16.3 13 <df[,4] [76 × 4]> #> 8 932. 13.6 10 <df[,4] [70 × 4]> #> 9 936. 3.59 9 <df[,4] [68 × 4]> #> 10 944. 8.02 8 <df[,4] [66 × 4]> #> 11 953. 8.83 7 <df[,4] [64 × 4]> #> 12 956. 2.71 6 <df[,4] [62 × 4]> #> 13 964. 8.49 5 <df[,4] [60 × 4]> #> 14 984. 20.3 3 <df[,4] [56 × 4]> #> 15 990. 6.10 2 <df[,4] [54 × 4]> #> 16 1003. 12.8 1 <df[,4] [52 × 4]>