Given a list of affinity matrices, Wall, the number of clusters, return a matrix containing the NMIs between cluster assignments made with spectral clustering.
List of matrices. Each element of the list is a square, symmetric matrix that shows affinities of the data points from a certain view.
Number of clusters
Returns an affinity matrix that represents the neighborhood graph of the data points.
Dr. Anna Goldenberg, Bo Wang, Aziz Mezlini, Feyyaz Demir
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
# 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. #dataL = lapply(dataL, standardNormalization) # Calculate the distances for each view distL = lapply(dataL, function(x) dist2(x, x)) # Construct the similarity graphs affinityL = lapply(distL, function(x) affinityMatrix(x, K, alpha)) # an example of how to use concordanceNetworkNMI Concordance_matrix = concordanceNetworkNMI(affinityL, 3); ## The output, Concordance_matrix, ## shows the concordance between the fused network and each individual network.