R/plot_comm_dendrogram.R
extract_comm_girvan.Rd
Extract communities via the Girvan Newman method
extract_comm_girvan(
x,
weights = NA,
directed = TRUE,
modularity = TRUE,
edge.betweenness = FALSE,
bridges = FALSE,
merges = TRUE,
membership = TRUE
)
The input graph, edge directions are ignored in directed graphs.
The weights of the edges. It must be a positive numeric vector,
NULL
or NA
. If it is NULL
and the input graph has a
‘weight’ edge attribute, then that attribute will be used. If NULL
and
no such attribute is present, then the edges will have equal weights.
Set this to NA
if the graph was a ‘weight’ edge attribute, but you
don't want to use it for community detection. Larger edge weights increase
the probability that an edge is selected by the random walker.
In other words, larger edge weights correspond to stronger connections.
Logical constant, whether to calculate directed edge betweenness for directed graphs. It is ignored for undirected graphs.
Logical scalar, whether to include the vector of the
modularity scores in the result. If the membership argument is TRUE
,
then it will always be calculated.
Logical constant, whether to return the edge betweenness of the edges at the time of their removal.
Logical constant, whether to return a list the edge removals which actually splitted a component of the graph.
Logical scalar, whether to include the merge matrix in the result.
Logical scalar, whether to calculate the membership vector for the split corresponding to the highest modularity value.
a communities object that can be handled with the functions at
membership
.
The edge betweenness score of an edge measures the number of shortest paths through it. The idea of the edge betweenness-based community structure detection is that it is likely that edges connecting separate modules have high edge betweenness as all the shortest paths from one module to another must traverse through them. So if we gradually remove the edge with the highest edge betweenness score we will get a hierarchical map, a rooted tree, called a dendrogram of the graph. The leafs of the tree are the individual vertices and the root of the tree represents the whole graph.
The result of this function can be queried using the utility functions
documented here: membership
,
this function just wraps the edge_betweenness
function and documentation.