Learn R Programming

clustAnalytics (version 0.5.5)

expansion: Expansion

Description

Given a graph (possibly weighted) split into communities, the expansion of a community is the sum of all edge weights connecting it to the rest of the graph divided by the number of vertices in the community

Usage

expansion(g, com)

Value

Numeric vector with the expansion 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.

See Also

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

Examples

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

Run the code above in your browser using DataLab