Description Usage Arguments Value Author(s) References Examples
Calculate the mutual information between vectors x and y.
1 | calNMI(x, y)
|
x |
a vector |
y |
a vector |
Returns the mutual information between vectors x and y.
Dr. Anna Goldenberg, Bo Wang, Aziz Mezlini, Feyyaz Demir
B Wang, A Mezlini, F Demir, M Fiume, T Zu, M Brudno, B Haibe-Kains, A Goldenberg (2014) Similarity Network Fusion: a fast and effective method to aggregate multiple data types on a genome wide scale. Nature Methods. Online. Jan 26, 2014
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | # How to use SNF with multiple views
# Load views into list "dataL"
data(dataL)
data(label)
# Set the other parameters
K = 20 # number of neighbours
alpha = 0.5 # hyperparameter in affinityMatrix
T = 20 # number of iterations of SNF
# Normalize the features in each of the views if necessary
# dataL = lapply(dataL, standardNormalization)
# Calculate the distances for each view
distL = lapply(dataL, function(x) (dist2(x, x))^(1/2))
# Construct the similarity graphs
affinityL = lapply(distL, function(x) affinityMatrix(x, K, alpha))
# Example of how to use SNF to perform subtyping
# Construct the fused network
W = SNF(affinityL, K, T)
# Perform clustering on the fused network.
clustering = spectralClustering(W,3);
# Use NMI to measure the goodness of the obtained labels.
NMI = calNMI(clustering,label);
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.