fitNSBM() estimates model parameters of the noisy stochastic block model and provides a clustering of the nodes
fitNSBM(
dataMatrix,
model = "Gauss0",
sbmSize = list(Qmin = 1, Qmax = NULL, explor = 1.5),
filename = NULL,
initParam = list(nbOfTau = NULL, nbOfPointsPerTau = NULL, maxNbOfPasses = NULL,
minNbOfPasses = 1),
nbCores = parallel::detectCores()
)observed dense adjacency matrix
Implemented models:
Gaussall Gaussian parameters of the null and the alternative distributions are unknown ; this is the Gaussian model with maximum number of unknown parameters
Gauss0compared to Gauss, the mean of the null distribution is set to 0
Gauss01compared to Gauss, the null distribution is set to N(0,1)
GaussEqVarcompared to Gauss, all Gaussian variances (of both the null and the alternative) are supposed to be equal, but unknown
Gauss0EqVarcompared to GaussEqVar, the mean of the null distribution is set to 0
Gauss0Var1compared to Gauss, all Gaussian variances are set to 1 and the null distribution is set to N(0,1)
Gauss2distrthe alternative distribution is a single Gaussian distribution, i.e. the block memberships of the nodes do not influence on the alternative distribution
GaussAffilcompared to Gauss, for the alternative distribution, there's a distribution for inter-group and another for intra-group interactions
Expthe null and the alternatives are all exponential distributions (i.e. Gamma distributions with shape parameter equal to one) with unknown scale parameters
ExpGammathe null distribution is an unknown exponential, the alterantive distribution are Gamma distributions with unknown parameters
list of parameters determining the size of SBM (the number of latent blocks) to be expored
Qminminimum number of latent blocks
Qmaxmaximum number of latent blocks
explorif Qmax is not provided, then Qmax is automatically determined as explor times the number of blocks where the ICL is maximal
results are saved in a file with this name (if provided)
list of parameters that fix the number of initializations
nbOfTaunumber of initial points for the node clustering (i. e. for the variational parameters tau)
nbOfPointsPerTaunumber of initial points of the latent binary graph
maxNbOfPassesmaximum number of passes through the SBM models, that is, passes from Qmin to Qmax or inversely
minNbOfPassesminimum number of passes through the SBM models
number of cores used for parallelization
Returns a list of estimation results for all numbers of latent blocks considered by the algorithm. Every element is a list composed of:
thetaestimated parameters of the noisy stochastic block model; a list with the following elements:
piparameter estimate of pi
wparameter estimate of w
nu0parameter estimate of nu0
nuparameter estimate of nu
clusteringnode clustering obtained by the noisy stochastic block model, more precisely, a hard clustering given by the
maximum aposterior estimate of the variational parameters sbmParam$edgeProba
sbmParamfurther results concerning the latent binary stochastic block model. A list with the following elements:
Qnumber of latent blocks in the noisy stochastic block model
clusterProbasoft clustering given by the conditional probabilities of a node to belong to a given latent block.
In other words, these are the variational parameters tau; (Q x n)-matrix
edgeProbaconditional probabilities rho of an edges given the node memberships of the interacting nodes; (N_Q x N)-matrix
ICLvalue of the ICL criterion at the end of the algorithm
convergencea list of convergence indicators:
Jvalue of the lower bound of the log-likelihood function at the end of the algorithm
complLogLikvalue of the complete log-likelihood function at the end of the algorithm
convergedindicates if algorithm has converged
nbIternumber of iterations performed
fitNSBM() supports different probability distributions for the edges and can estimate the number of node blocks
# NOT RUN {
n <- 10
theta <- list(pi= c(0.5,0.5), nu0=c(0,.1),
nu=matrix(c(-2,10,-2, 1,1,1),3,2), w=c(.5, .9, .3))
obs <- rnsbm(n, theta, modelFamily='Gauss')
res <- fitNSBM(obs$dataMatrix, sbmSize = list(Qmax=3),
initParam=list(nbOfTau=1, nbOfPointsPerTau=1), nbCores=1)
# }
Run the code above in your browser using DataLab