View source: R/validate-edge-prediction.R
validateEdgePrediction | R Documentation |
This function compares the imputation approaches for predicting edges using the clustering result of a submatrix with non-missing values as a benchmark. This function performs the same analysis as the findCluster
function on every imputed incidence matrices independently. Then, using different similarity measures, all imputation approaches are compared to each other, revealing how edge prediction methods affects network communities (clusters). The best method should result in a higher degree of similarity (common node membership) to the non-missing submatrix as a benchmark.
validateEdgePrediction(imputation, refer_community, clustering_args)
imputation |
A list or a matrix containing the results of imputation method (s). |
refer_community |
An igraph community object obtained through |
clustering_args |
A list indicating the clustering arguments values used in |
A list containing the following indices: Jaccard similarity, Dice similarity coefficient, Rand index, Minkowski (inversed), and Fowlkes-Mallows index. The higher value indicates the greater similarity between the imputed dataset and the benchmark.
# load part of the beatAML data
beatAML_data <- NIMAA::beatAML[1:10000,]
# convert to incidence matrix
beatAML_incidence_matrix <- nominalAsBinet(beatAML_data)
# do clustering
cls <- findCluster(beatAML_incidence_matrix, part = 1)
# predict the edges by imputation the weights
imputed_beatAML <- predictEdge(beatAML_incidence_matrix)
# validate the edge prediction
validateEdgePrediction(imputation = imputed_beatAML,
refer_community = cls$fast_greedy,
clustering_args = cls$clustering_args
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.