View source: R/fct_get_Blocks.R
get_block.SimpleSBM_fit | R Documentation |
A fct that return blocks attribution or probabilities for each nodes in a Sbm fit from the sbm package.
## S3 method for class 'SimpleSBM_fit'
get_block(
x,
labels = "default",
node_names = NULL,
attribution = TRUE,
proportion = FALSE
)
x |
Sbm model of class 'SimpleSBM_fit'. |
labels |
labels for nodes. If it's simple sbm it should be a single character ("default" -> c("nodes")). If sbm is bipartite a named character (names are row and col) ("default" -> c(row = 'row', col = 'col')). |
node_names |
character: node names |
attribution |
Boolean indicating whether or not the produced tables should contain a block attribution column. This column shows the block in which each nodes is the most likely to be. |
proportion |
Boolean indicating whether or not the produced tables should contain the probabilities to belong in each blocks. These columns shows for every nodes and every blocks the probabilities that the node belong to the block. |
A data.frame with block attributions and/or proportions
# my_sbm_uni <- sbm::estimateSimpleSBM(sbm::fungusTreeNetwork$tree_tree,
# model = "poisson")
my_sbm_uni <- FungusTreeNetwork$sbmResults$tree_tree
node_names_uni <- list(FungusTreeNetwork$networks$tree_names)
my_blocks_uni <- get_block(my_sbm_uni,
labels = c("Tree"),
node_names = node_names_uni
)
my_blocks_uni
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.