R6 class for Bipartite SBM
R6 class for Bipartite SBM
vector of two characters giving the label of each connected dimension (row, col)
list of two vectors of block proportions (aka prior probabilities of each block)
parameters associated to the connectivity of the SBM, e.g. matrix of inter/inter block probabilities when model is Bernoulli
matrix of estimated probabilities for block memberships for all nodes
vector of size 2: number of blocks (rows, columns)
number of dyads (potential edges in the network)
number of parameter used for the connectivity
list of size 2: vector of memberships in row, in column.
matrix for clustering memberships
constructor for SBM
BipartiteSBM$new( model, nbNodes, blockProp, connectParam, dimLabels = c(row = "row", col = "col"), covarParam = numeric(length(covarList)), covarList = list() )
character describing the type of model
number of nodes in each dimension of the network
parameters for block proportions (vector of list of vectors)
list of parameters for connectivity with a matrix of means 'mean' and an optional scalar for the variance 'var'. The dimensions of mu must match
optional labels of each dimension (in row, in column)
optional vector of covariates effect
optional list of covariates data
a method to sample new block memberships for the current SBM
BipartiteSBM$rMemberships(store = FALSE)
should the sampled blocks be stored (and overwrite the existing data)? Default to FALSE
the sampled blocks
a method to sample a network data (edges) for the current SBM
BipartiteSBM$rEdges(store = FALSE)
should the sampled edges be stored (and overwrite the existing data)? Default to FALSE
the sampled network
prediction under the current parameters
BipartiteSBM$predict(covarList = self$covarList, theta_p0 = 0)
a list of covariates. By default, we use the covariates with which the model was estimated.
double for thresholding...
BipartiteSBM$show(type = "Bipartite Stochastic Block Model")
character used to specify the type of SBM
basic matrix plot method for BipartiteSBM object or mesoscopic plot
BipartiteSBM$plot( type = c("data", "expected", "meso"), ordered = TRUE, plotOptions = list() )
character for the type of plot: either 'data' (true connection), 'expected' (fitted connection) or 'meso' (mesoscopic view). Default to 'data'.
logical: should the rows and columns be reordered according to the clustering? Default to
list with the parameters for the plot. See help of the corresponding S3 method for details.
a ggplot2 object for the
'expected', a list with the igraph object
layout and the
plotOptions for the
The objects of this class are cloneable with this method.
BipartiteSBM$clone(deep = FALSE)
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.