-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmember_community_hier.Rd
142 lines (122 loc) · 4.74 KB
/
member_community_hier.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/member_community.R
\name{member_community_hier}
\alias{member_community_hier}
\alias{node_in_betweenness}
\alias{node_in_greedy}
\alias{node_in_eigen}
\alias{node_in_walktrap}
\title{Hierarchical community partitioning algorithms}
\usage{
node_in_betweenness(.data)
node_in_greedy(.data)
node_in_eigen(.data)
node_in_walktrap(.data, times = 50)
}
\arguments{
\item{.data}{An object of a manynet-consistent class:
\itemize{
\item matrix (adjacency or incidence) from \code{{base}} R
\item edgelist, a data frame from \code{{base}} R or tibble from \code{{tibble}}
\item igraph, from the \code{{igraph}} package
\item network, from the \code{{network}} package
\item tbl_graph, from the \code{{tidygraph}} package
}}
\item{times}{Integer indicating number of simulations/walks used.
By default, \code{times=50}.}
}
\description{
These functions offer algorithms for hierarchically clustering
networks into communities. Since all of the following are hierarchical,
their dendrograms can be plotted:
\itemize{
\item \code{node_in_betweenness()} is a hierarchical, decomposition algorithm
where edges are removed in decreasing order of the number of
shortest paths passing through the edge.
\item \code{node_in_greedy()} is a hierarchical, agglomerative algorithm,
that tries to optimize modularity in a greedy manner.
\item \code{node_in_eigen()} is a top-down, hierarchical algorithm.
\item \code{node_in_walktrap()} is a hierarchical, agglomerative algorithm based on random walks.
}
The different algorithms offer various advantages in terms of computation time,
availability on different types of networks, ability to maximise modularity,
and their logic or domain of inspiration.
}
\section{Edge-betweenness}{
This is motivated by the idea that edges connecting different groups
are more likely to lie on multiple shortest paths when they are the
only option to go from one group to another.
This method yields good results but is very slow because of
the computational complexity of edge-betweenness calculations and
the betweenness scores have to be re-calculated after every edge removal.
Networks of ~700 nodes and ~3500 ties are around the upper size limit
that are feasible with this approach.
}
\section{Fast-greedy}{
Initially, each node is assigned a separate community.
Communities are then merged iteratively such that each merge
yields the largest increase in the current value of modularity,
until no further increases to the modularity are possible.
The method is fast and recommended as a first approximation
because it has no parameters to tune.
However, it is known to suffer from a resolution limit.
}
\section{Leading eigenvector}{
In each step, the network is bifurcated such that modularity increases most.
The splits are determined according to the leading eigenvector of the modularity matrix.
A stopping condition prevents tightly connected groups from being split further.
Note that due to the eigenvector calculations involved,
this algorithm will perform poorly on degenerate networks,
but will likely obtain a higher modularity than fast-greedy (at some cost of speed).
}
\section{Walktrap}{
The general idea is that random walks on a network are more likely to stay
within the same community because few edges lead outside a community.
By repeating random walks of 4 steps many times,
information about the hierarchical merging of communities is collected.
}
\examples{
node_in_betweenness(ison_adolescents)
if(require("ggdendro", quietly = TRUE)){
plot(node_in_betweenness(ison_adolescents))
}
node_in_greedy(ison_adolescents)
node_in_eigen(ison_adolescents)
node_in_walktrap(ison_adolescents)
}
\references{
\subsection{On edge-betweenness community detection}{
Newman, Mark, and Michelle Girvan. 2004.
"Finding and evaluating community structure in networks."
\emph{Physical Review E} 69: 026113.
\doi{10.1103/PhysRevE.69.026113}
}
\subsection{On fast-greedy community detection}{
Clauset, Aaron, Mark E.J. Newman, and Cristopher Moore. 2004.
"Finding community structure in very large networks."
\emph{Physical Review E}, 70: 066111.
\doi{10.1103/PhysRevE.70.066111}
}
\subsection{On leading eigenvector community detection}{
Newman, Mark E.J. 2006.
"Finding community structure using the eigenvectors of matrices"
\emph{Physical Review E} 74:036104.
\doi{10.1103/PhysRevE.74.036104}
}
\subsection{On walktrap community detection}{
Pons, Pascal, and Matthieu Latapy. 2005.
"Computing communities in large networks using random walks".
1-20.
\doi{10.48550/arXiv.physics/0512106}
}
}
\seealso{
Other memberships:
\code{\link{mark_core}},
\code{\link{member_brokerage}},
\code{\link{member_cliques}},
\code{\link{member_community_non}},
\code{\link{member_components}},
\code{\link{member_equivalence}}
}
\concept{memberships}