Factorizability
(number between 0 and 1) for the input adjacency matrix adj
. If a module (class) assignment vector Cl
is provided then the function automatically carries out the module- and conformity based decomposition of the adjacency matrix. In this case, it outputs a list of (intramodular) conformity vectors, an estimate of the intermodular adjacency matrix,
the overall Factorizability
(number between 0 and 1), and a vector of intramodular factorizabilities.conformityDecomposition(adj, Cl = NULL)
adj
. The variable assigns each network node (row of adj
) to a a module. The entries of Cl
could be integers or character strings.Cl=NULL
then it is a numeric vector of length equal to the number of nodes. Otherwise code{Conformity} is a list whose components provide one (intramodular) conformity vector for each module (class level) specified in Cl
. In this case, the list components
correspond to the entries of Cl.level
.Cl
. Interpretation: it measures the similarity (adjacency) between the modules.
In this case, the rows (and columns) of IntermodularAdjacency
correspond to the entries of Cl.level
.Cl=NULL
then it equals 1, if (and only if) adj
is exactly factorizable.
If Cl
is a vector, then it measures how well the module- and CF based decomposition approximates adj
.Cl
. Its entries report the factorizability measure for each module. The components correspond to the entries of Cl.level
.Cl
. Incidentally, the function automatically turns Cl
into a factor variable. The components of Conformity
and
IntramodularFactorizability
correspond to the entries of Cl.level
.adj[i,j]
=CF[i]*CF[j] where CF is the conformity vector. The conformity CF turns out to be highly related to the network connectivity (aka degree). If adj
is not exactly factorizable, then the function conformityDecomposition
calculates a conformity vector of the exactly factorizable network that best approximates adj
. The factorizability measure Factorizability
is a number between 0 and 1. The higher Factorizability
, the more factorizable is adj
. One can easily show that the conformity vector is not unique if adj
contains only 2 nodes. However, for more than 2 nodes the conformity is uniquely defined when dealing with an exactly factorizable weighted network whose entries adj[i,j]
are larger than 0. In this case, one can get explicit formulas for the conformity (Dong and Horvath 2007).
If the module assignment vector Cl
is provided then the function calculates the module- and CF-based approximation of adj
(explained in chapter 2 in Horvath 2011). Currently, the function only implements a heuristic algorithm for arriving at approximate solutions of the module- and CF-based approximation of adj
(chapter 2 of Horvath 2011). Another, more accurate Majorization Minorization (MM) algorithm for the decomposition is implemented in the function propensityDecomposition
by Ranola et al (2011).conformityBasedNetworkConcepts
,propensityDecomposition
# the examples assume that number of nodes is divisible by 6
n=12
# here is a perfectly factorizable matrix
A=matrix(1,nrow=n,ncol=n)
# this provides the conformity vector and factorizability measure
conformityDecomposition(adj=A)
# now assume we have a class assignment
Cl=rep(c(1,2),c(n/2,n/2))
conformityDecomposition(adj=A,Cl=Cl)
# here is a block diagonal matrix
blockdiag.A=A
blockdiag.A[1:(n/3),(n/3+1):n]=0
blockdiag.A[(n/3+1):n , 1:(n/3)]=0
block.Cl=rep(c(1,2),c(n/3,2*n/3))
conformityDecomposition(adj= blockdiag.A,Cl=block.Cl)
Run the code above in your browser using DataLab