An R6 Class object, a fitted population of netowrks sbm once $optimize() is done
fitSimpleSBMPop.Rd
An 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
n
A list of size M with the number of nodes per network
M
Number of networks
A
List of incidence matrices of size
n \times n
mask
List of M masks, indicating NAs in the matrices. 1 for NA, 0 else
nb_inter
A vector of length M the number of unique non NA entries
directed
A boolean indicating if the networks are directed or not
Q
An integer indicating the number of blocks
tau
List of length M, variational parameters
n[m]xQ[m]
matricesalpha
Matrix of size QxQ, connection parameters
delta
Vector of M, density parameters with
delta[1] = 1
pi
List of M vectors of size Q, the mixture parameters
e
Vector of size M, the sum of unique entries
emqr
List of M QxQ matrix, the sum of edges between q and r in m
nmqr
List of M QxQ matrix, the number of entries between q and r in m
pim
List of M vectors of size Q, the mixture parameters (pi_tilde)
alpham
list of M QxQ matrix, the classic sbm parameters (alpha_tilde)
free_mixture
A boolean indicating if the model is with free mixture
free_density
A boolean indicating if the model is with free density
weight
A vector of size M for weighted likelihood
distribution
The emission distribution, either bernoulli or poisson
Cpi
A list of matrices of size Q x M containing TRUE (1) or FALSE (0) if the cluster is represented in the network m
Calpha
The corresponding support on the connectivity parameters computed with Cpi.
mloss
Loss on the M step of the VEM
vloss
Loss on the VE step of the VEM
vbound
The variational bound
net_id
A vector containing the "ids" or names of the networks (if none given, they are set to their number in A list)
df_mixture
The degrees of freedom for mixture parameters pi,used to compute penalty
df_connect
The degrees of freedom for connection parameters alpha,used to compute penalty
df_density
The degrees of freedom for density parameters delta, used to compute penalty
logfactA
A quantity used with the Poisson probability distribution
init_method
The initialization method used for the first clustering
penalty
The penalty computed based on the number of parameters
Z
The clusters memberships, a list of size M of two matrices : 1 for rows clusters memberships and 2 for columns clusters memberships
map
Maximum a posteriori
map_parameters
MAP params
ICL
Stores the ICL of the model
penalty_clustering
Unused attribute
BICL
Stores the BICL of the model
net_clustering
Unused parameter
counter_merge
A counter for the merge (backward) steps
counter_split
A counter for the splitting (forward) steps
fit_opts
Fit parameters, used to determine the fitting method/
Active bindings
dircoef
The coefficients used change if the network is directed or not
nb_nodes
Returns n a list of the number of nodes per network
nb_clusters
Returns Q an integer with the number of blocks
support
Returns the Cpi, a list of M boolean matrices indicating which blocks are populated
memberships
Returns the tau, the probabilities of memberships "a posteriori", after seeing the data
parameters
Returns the list of parameters of the model, alpha, pi and delta
pred_dyads
Predicted 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
A
List of incidence Matrix of size
n[[2]][m]xn[[2]][m]
Q
The number of blocks
Z
The block memberships, a list of size M of two matrices : 1 for rows clusters memberships and 2 for columns clusters memberships
mask
List of M masks, indicating NAs in the matrices. 1 for NA, 0 else
net_id
A vector containing the "ids" or names of the networks (if none given, they are set to their number in A list)
distribution
Emission distribution either : "poisson" or "bernoulli"
free_mixture
A boolean indicating if there is a free mixture
free_density
A boolean indicating if there is a free_density
directed
A boolean specifying if the networks are directed or not
init_method
The initialization method used for the first clustering
weight
A vector of size M for weighted likelihood
Cpi
A 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
Calpha
The corresponding support on the connectivity parameters computed with Cpi.
logfactA
A quantity used with the Poisson probability distribution
fit_opts
Fit parameters, used to determine the fitting method/ Method to compute the maximum a posteriori for Z clustering
greedy_exploration_starting_point
Stores 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
Method ve_step()
Method optimize()
Method plot()
Arguments
type
The type of the plot. Could be "graphon", "meso" or "block".
ord
A reordering of the blocks.
mixture
Should the block proportions of each network be plotted as well?
net_id
The id of the network to plot. Used to plot only on network in "graphon" view.
...
Further arguments to be passed