ICLStochBlock | R Documentation |
clu
is a list, the method for linked/multilevel networks is applied. The support for multirelational networks is not tested.Function that computes integrated classification likelihood based on stochastic one-mode and linked block modeling. If clu
is a list, the method for linked/multilevel networks is applied. The support for multirelational networks is not tested.
ICLStochBlock( M, clu, weights = NULL, uWeights = NULL, diagonal = c("ignore", "seperate", "same"), limitType = c("none", "inside", "outside"), limits = NULL, weightClusterSize = 1, addOne = TRUE, eps = 0.001 )
M |
A matrix representing the (usually valued) network. For multi-relational networks, this should be an array with the third dimension representing the relation. |
clu |
A partition. Each unique value represents one cluster. If the nework is one-mode, than this should be a vector, else a list of vectors, one for each mode. Similarly, if units are comprised of several sets, clu should be the list containing one vector for each set. |
weights |
The weights for each cell in the matrix/array. A matrix or an array with the same dimmensions as |
uWeights |
The weights for each unin. A vector with the length equal to the number of units (in all sets). |
diagonal |
How should the diagonal values be treated. Possible values are:
|
limitType |
Type of limit to use. Forced to 'none' if |
limits |
If
If |
weightClusterSize |
The weight given to cluster sizes (logprobabilites) compared to ties in loglikelihood. Defaults to 1, which is "classical" stochastic blockmodeling. |
addOne |
Should one tie with the value of the tie equal to the density of the superBlock be added to each block to prevent block means equal to 0 or 1 and also "shrink" the block means toward the superBlock mean. Defaults to TRUE. |
eps |
If addOne = FALSE, the minimal deviation from 0 or 1 that the block mean/density can take. |
The value of ICL
llStochBlock
; weightsMlLoglik
# Create a synthetic network matrix set.seed(2022) library(blockmodeling) k<-2 # number of blocks to generate blockSizes<-rep(20,k) IM<-matrix(c(0.8,.4,0.2,0.8), nrow=2) clu<-rep(1:k, times=blockSizes) n<-length(clu) M<-matrix(rbinom(n*n,1,IM[clu,clu]),ncol=n, nrow=n) clu<-sample(1:2,nrow(M),replace=TRUE) plotMat(M,clu) # Have a look at this random partition ICL_pre<-ICLStochBlock(M,clu) # Calculate its ICL ICL_pre res<-stochBlock(M,clu=clu) # Optimizing the partition plot(res) # Have a look at the optimized partition ICL_post<-res$ICL # Calculate its ICL ICL_post # We expect the ICL pre-optimisation to be smaller: ICL_pre<ICL_post
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.