Exports the current state of the network as dataframe with each node as a row
and columns for node id, parent id, node type, and node level. Can also be
accomplished by attr(sbm, 'state')
.
state(sbm)
sbm |
|
---|
A dataframe describing the current state of the network:
id of node
id of node's parent. none
if node has
no parent.
type of node
level of node in network hierarchy
Other modeling:
choose_best_collapse_state()
,
collapse_blocks()
,
collapse_run()
,
entropy()
,
interblock_edge_counts()
,
mcmc_sweep()
,
n_blocks()
# 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) state(net)#> NULL#> id type parent level #> 1 b1 node bl_node_0 0 #> 2 b3 node bl_node_1 0 #> 3 a1 node bl_node_0 0 #> 4 b2 node bl_node_1 0 #> 5 a3 node bl_node_0 0 #> 6 b4 node bl_node_1 0 #> 7 a2 node bl_node_0 0