missSBM_collection: An R6 class to represent a collection of SBM fits with...

missSBM_collectionR Documentation

An R6 class to represent a collection of SBM fits with missing data

Description

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() and print()

Active bindings

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

Methods

Public methods


Method new()

constructor for networkSampling

Usage
missSBM_collection$new(partlyObservedNet, sampling, clusterInit, control)
Arguments
partlyObservedNet

An object with class partlyObservedNetwork.

sampling

The sampling design for the modelling of missing data: MAR designs ("dyad", "node") and MNAR designs ("double-standard", "block-dyad", "block-node" ,"degree")

clusterInit

Initial clustering: a list of vectors, each with size ncol(adjacencyMatrix).

control

a list of parameters controlling advanced features. Only 'trace' and 'useCov' are relevant here. See estimateMissSBM() for details.


Method estimate()

method to launch the estimation of the collection of models

Usage
missSBM_collection$estimate(control)
Arguments
control

a list of parameters controlling the variational EM algorithm. See details of function estimateMissSBM()


Method explore()

method for performing exploration of the ICL

Usage
missSBM_collection$explore(control)
Arguments
control

a list of parameters controlling the exploration, similar to those found in the regular function estimateMissSBM()


Method plot()

plot method for missSBM_collection

Usage
missSBM_collection$plot(type = c("icl", "elbo", "monitoring"))
Arguments
type

the type specifies the field to plot, either "icl", "elbo" or "monitoring". Default is "icl"


Method show()

show method for missSBM_collection

Usage
missSBM_collection$show()

Method print()

User friendly print method

Usage
missSBM_collection$print()

Method clone()

The objects of this class are cloneable with this method.

Usage
missSBM_collection$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

## Uncomment to set parallel computing with future
## future::plan("multicore", workers = 2)

## Sample 75% of dyads in  French political Blogosphere's network data
adjacencyMatrix <- missSBM::frenchblog2007 %>%
  igraph::delete.vertices(1:100) %>%
  igraph::as_adj () %>%
  missSBM::observeNetwork(sampling = "dyad", parameters = 0.75)
collection <- estimateMissSBM(adjacencyMatrix, 1:5, sampling = "dyad")
class(collection)


jchiquet/missSBM documentation built on Oct. 25, 2023, 5:30 a.m.