Learn R Programming

clustAnalytics (version 0.5.5)

density_ratio: Density Ratio

Description

Density ratio of a graph's communities.

Usage

density_ratio(g, com, type = "local")

Value

Numeric vector with the internal density of each community.

Arguments

g

Graph to be analyzed (as an igraph object). If the edges have a "weight" attribute, those will be used as weights.

com

community membership integer vector. Each element corresponds to a vertex.

type

can either be "local" or "global"

See Also

Other cluster scoring functions: FOMD(), average_degree(), average_odf(), conductance(), coverage(), cut_ratio(), edges_inside(), expansion(), internal_density(), max_odf(), normalized_cut(), scoring_functions(), weighted_clustering_coefficient(), weighted_transitivity()

Examples

Run this code
data(karate, package="igraphdata")
density_ratio(karate, membership(cluster_louvain(karate)))

Run the code above in your browser using DataLab