scoreCluster: Score the cluster analysis in a projected network based on...

View source: R/score-cluster.R

scoreClusterR Documentation

Score the cluster analysis in a projected network based on additional internal measures.

Description

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.

Usage

scoreCluster(community, graph, dist_mat)

Arguments

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 findCluster to analyze.

Value

A list containing internal cluster validity scores.

See Also

cluster.stats, findCluster

Examples

# 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)


jafarilab/NIMAA documentation built on July 29, 2023, 5:36 a.m.