View source: R/score-cluster.R
scoreCluster | R Documentation |
This function provides additional internal cluster validity measures such as entropy and coverage. The concept of scoring is according to the weight fraction of all intra-cluster edges relative to the total weights of all edges in the graph. This function requires the community object, igraph object and distance matrix returned by findCluster
to analyze.
scoreCluster(community, graph, dist_mat)
community |
An igraph community object. |
graph |
An igraph graph object. |
dist_mat |
A matrix containing the distance of nodes in the network. This matrix can be retrieved by the output of |
A list containing internal cluster validity scores.
cluster.stats
, findCluster
# 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, method = "infomap", normalization = FALSE,
rm_weak_edges = TRUE, comparison = FALSE)
# get the scoring result
scoreCluster(community = cls$infomap, graph = cls$graph,
dist_mat = cls$distance_matrix)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.