Calculate the TOM from a correlation matrix
calculate_tom.RdCalculate the TOM from a correlation matrix
Usage
calculate_tom(cor_mat, signed, version = c("v1", "v2"))Value
A symmetric matrix of the same dimensions as cor_mat containing
the topological overlap measures.
Details
Calculates the topological overlap matrix from a correlation matrix. The TOM is defined as:
Unsigned, v1:
$$TOM_{ij} = \frac{a_{ij} + \sum_{k \neq i,j} a_{ik} a_{kj}}{\min(k_i, k_j) + 1 - a_{ij}}$$
Signed, v1:
$$TOM_{ij} = \frac{a_{ij} + \sum_{k \neq i,j} a_{ik} a_{kj}}{\min(k_i, k_j) + 1 - \left|a_{ij}\right|}$$
Unsigned, v2:
$$TOM_{ij} = 0.5 \left( a_{ij} + \frac{\sum_{k \neq i,j} a_{ik} a_{kj}}{\min(k_i, k_j) + a_{ij}} \right)$$
Signed, v2:
$$TOM_{ij} = 0.5 \left( a_{ij} + \frac{\sum_{k \neq i,j} a_{ik} a_{kj}}{\min(k_i, k_j) + \left|a_{ij}\right|} \right)$$
where \(a_{ij}\) is the affinity between nodes \(i\) and \(j\), and \(k_i = \sum_j a_{ij}\) is the connectivity of node \(i\). For signed networks, connectivity is calculated as \(k_i = \sum_j \left|a_{ij}\right|\).
Version 2 uses a different normalization approach that scales the shared neighbor contribution separately before combining it with the direct connection strength.