| scoring_functions {clustAnalytics} | R Documentation |
Scoring Functions of a Graph Partition
Description
Computes the scoring functions of a graph and its clusters.
Usage
scoring_functions(
g,
com,
no_clustering_coef = TRUE,
type = "local",
weighted = TRUE,
w_max = NULL
)
Arguments
g |
Graph to be analyzed (as an |
com |
Community membership integer vector. Each element corresponds to a vertex of the graph, and contains the index of the community it belongs to. |
no_clustering_coef |
Logical. If TRUE, skips the computation of the clustering coefficient (which can be slow on large graphs). |
type |
can be "local" for a cluster by cluster analysis, or "global" for a global analysis of the whole graph partition. |
weighted |
Is the graph weighted? If it is, doesn't compute TPR score. |
w_max |
Numeric. Upper bound for edge weights. Should be generally left as default (NULL). Only affects the computation of the clustering coefficient. |
Value
If type=="local", returns a dataframe with a row for each
community, and a column for each score. If type=="global", returns a
single row with the weighted average scores.
See Also
Other cluster scoring functions:
FOMD(),
average_degree(),
average_odf(),
conductance(),
coverage(),
cut_ratio(),
density_ratio(),
edges_inside(),
expansion(),
internal_density(),
max_odf(),
normalized_cut(),
weighted_clustering_coefficient(),
weighted_transitivity()
Examples
data(karate, package="igraphdata")
scoring_functions(karate, membership(cluster_louvain(karate)))