The function estimateMissSBM()
fits a collection of SBM with missing data for
a varying number of block. These models with class missSBM_fit
are stored in an instance
of an object with class missSBM_collection
, described here.
Fields are accessed via active binding and cannot be changed by the user.
This class comes with a set of R6 methods, some of them being useful for the user and exported
as S3 methods. See the documentation for show()
, print()
and smooth()
, the latter being
used to smooth the ICL on a collection of model, as post-treatment.
models
a list of models
ICL
the vector of Integrated Classification Criterion (ICL) associated to the models in the collection (the smaller, the better)
bestModel
the best model according to the ICL
vBlocks
a vector with the number of blocks
optimizationStatus
a data.frame summarizing the optimization process for all models
new()
constructor for networkSampling
missSBM_collection$new( partlyObservedNet, vBlocks, sampling, clusterInit, cores, trace, useCov )
partlyObservedNet
An object with class partlyObservedNetwork
.
vBlocks
vector of integer with the number of blocks in the successively fitted models
sampling
The sampling design for the modelling of missing data: MAR designs ("dyad", "node") and NMAR designs ("double-standard", "block-dyad", "block-node" ,"degree")
clusterInit
Initial method for clustering: either a character in "hierarchical", "spectral" or "kmeans", or a list with length(vBlocks)
vectors, each with size ncol(adjacencyMatrix)
, providing a user-defined clustering. Default is "hierarchical".
cores
integer for number of cores used. Default is 1.
trace
integer for verbosity (0, 1, 2). Default is 1. Useless when cores
> 1
useCov
logical. If covariates are present in partlyObservedNet, should they be used for the inference or of the network sampling design, or just for the SBM inference? default is TRUE.
estimate()
method to launch the estimation of the collection of models
missSBM_collection$estimate(control)
control
a list of parameters controlling the variational EM algorithm. See details of function estimateMissSBM()
smooth()
method for performing smoothing of the ICL
missSBM_collection$smooth(type, control)
type
character, the type of smoothing: forward, backward, both
control
a list of parameters controlling the smoothing. See details of regular function smooth()
show()
show method for missSBM_collection
missSBM_collection$show()
print()
User friendly print method
missSBM_collection$print()
clone()
The objects of this class are cloneable with this method.
missSBM_collection$clone(deep = FALSE)
deep
Whether to make a deep clone.
# NOT RUN {
## Sample 75% of dyads in French political Blogosphere's network data
adjacencyMatrix <- missSBM::frenchblog2007 %>%
igraph::as_adj (sparse = FALSE) %>%
missSBM::observeNetwork(sampling = "dyad", parameters = 0.25)
collection <- estimateMissSBM(adjacencyMatrix, 3:5, sampling = "dyad")
class(collection)
# }
Run the code above in your browser using DataLab