An R6 Class object, a fitted population of netowrks sbm once $optimize() is done
fitSimpleSBMPop.RdAn R6 Class object, a fitted population of netowrks sbm once $optimize() is done
An R6 Class object, a fitted population of netowrks sbm once $optimize() is done
Public fields
nA list of size M with the number of nodes per network
MNumber of networks
AList of incidence matrices of size
n \times nmaskList of M masks, indicating NAs in the matrices. 1 for NA, 0 else
nb_interA vector of length M the number of unique non NA entries
directedA boolean indicating if the networks are directed or not
QAn integer indicating the number of blocks
tauList of length M, variational parameters
n[m]xQ[m]matricesalphaMatrix of size QxQ, connection parameters
deltaVector of M, density parameters with
delta[1] = 1piList of M vectors of size Q, the mixture parameters
eVector of size M, the sum of unique entries
emqrList of M QxQ matrix, the sum of edges between q and r in m
nmqrList of M QxQ matrix, the number of entries between q and r in m
pimList of M vectors of size Q, the mixture parameters (pi_tilde)
alphamlist of M QxQ matrix, the classic sbm parameters (alpha_tilde)
free_mixtureA boolean indicating if the model is with free mixture
free_densityA boolean indicating if the model is with free density
weightA vector of size M for weighted likelihood
distributionThe emission distribution, either bernoulli or poisson
CpiA list of matrices of size Q x M containing TRUE (1) or FALSE (0) if the cluster is represented in the network m
CalphaThe corresponding support on the connectivity parameters computed with Cpi.
mlossLoss on the M step of the VEM
vlossLoss on the VE step of the VEM
vboundThe variational bound
net_idA vector containing the "ids" or names of the networks (if none given, they are set to their number in A list)
df_mixtureThe degrees of freedom for mixture parameters pi,used to compute penalty
df_connectThe degrees of freedom for connection parameters alpha,used to compute penalty
df_densityThe degrees of freedom for density parameters delta, used to compute penalty
logfactAA quantity used with the Poisson probability distribution
init_methodThe initialization method used for the first clustering
penaltyThe penalty computed based on the number of parameters
ZThe clusters memberships, a list of size M of two matrices : 1 for rows clusters memberships and 2 for columns clusters memberships
mapMaximum a posteriori
map_parametersMAP params
ICLStores the ICL of the model
penalty_clusteringUnused attribute
BICLStores the BICL of the model
net_clusteringUnused parameter
counter_mergeA counter for the merge (backward) steps
counter_splitA counter for the splitting (forward) steps
fit_optsFit parameters, used to determine the fitting method/
Active bindings
dircoefThe coefficients used change if the network is directed or not
nb_nodesReturns n a list of the number of nodes per network
nb_clustersReturns Q an integer with the number of blocks
supportReturns the Cpi, a list of M boolean matrices indicating which blocks are populated
membershipsReturns the tau, the probabilities of memberships "a posteriori", after seeing the data
parametersReturns the list of parameters of the model, alpha, pi and delta
pred_dyadsPredicted dyads from the estimated probabilities and parameters
Methods
Method new()
Initializes the fitBipartiteSBMPop object
Usage
fitSimpleSBMPop$new(
A = NULL,
Q = NULL,
Z = NULL,
mask = NULL,
net_id = NULL,
distribution = "bernoulli",
free_mixture = TRUE,
free_density = TRUE,
directed = NULL,
init_method = "spectral",
weight = NULL,
Cpi = NULL,
Calpha = NULL,
logfactA = NULL,
fit_opts = list(algo_ve = "fp", approx_pois = FALSE, minibatch = TRUE, verbosity = 1)
)Arguments
AList of incidence Matrix of size
n[[2]][m]xn[[2]][m]QThe number of blocks
ZThe block memberships, a list of size M of two matrices : 1 for rows clusters memberships and 2 for columns clusters memberships
maskList of M masks, indicating NAs in the matrices. 1 for NA, 0 else
net_idA vector containing the "ids" or names of the networks (if none given, they are set to their number in A list)
distributionEmission distribution either : "poisson" or "bernoulli"
free_mixtureA boolean indicating if there is a free mixture
free_densityA boolean indicating if there is a free_density
directedA boolean specifying if the networks are directed or not
init_methodThe initialization method used for the first clustering
weightA vector of size M for weighted likelihood
CpiA list of matrices of size Qd x M containing TRUE (1) or FALSE (0) if the d-th dimension cluster is represented in the network m
CalphaThe corresponding support on the connectivity parameters computed with Cpi.
logfactAA quantity used with the Poisson probability distribution
fit_optsFit parameters, used to determine the fitting method/ Method to compute the maximum a posteriori for Z clustering
greedy_exploration_starting_pointStores the coordinates Q1 & Q2 from the greedy exploration to keep track of the starting_point
Method vb_tau_alpha()
Method vb_tau_pi()
Method fn_vb_alpha_delta()
Method gr_vb_alpha_delta()
Method eval_g0_vb_alpha_delta()
Method eval_jac_g0_vb_alpha_delta()
Method fixed_point_tau()
Method fixed_point_alpha_delta()
Method update_pi()
Method update_pim()
Method update_alpham()
Method m_step()
The M step of the VEM