group_reduce {L1centrality} | R Documentation |
Computes the vertex multiplicities (weights) and the distance matrix of the group reduced graph. The group reduced graph is constructed by replacing a group of vertices in the original graph by a single ‘pseudo-vertex’.
group_reduce(g, nodes, eta, method)
## S3 method for class 'igraph'
group_reduce(g, nodes, eta = NULL, method = c("minimum", "maximum", "average"))
## S3 method for class 'matrix'
group_reduce(g, nodes, eta = NULL, method = "minimum")
g |
An |
nodes |
A vector of integers. Each integer indicates the index of the vertex. |
eta |
An optional nonnegative multiplicity (weight) vector for (vertex)
weighted networks. The sum of its components must be positive. If set to
|
method |
A character string. It specifies the method of setting the edge
weight between the pseudo-vertex and the other vertices. Note that the S3
method for the
|
The group reduced graph is constructed by replacing the vertices indicated in
the argument nodes
with a single ‘pseudo-vertex’. The
multiplicity (weight) of this new vertex is set to the sum of the
multiplicities of the vertices within nodes
. An edge from the
pseudo-vertex to any vertex that is not in nodes
, say
v, is created in the group reduced graph if
there is at least one edge from the vertices in nodes
to
v in the original graph. The weight of
this newly added edge is determined using one of the following methods:
Minimum method: The edge weight from the pseudo-vertex to
v is set to the minimum of the edge
weights of the edges between the vertices in nodes
to
v in the original graph.
Maximum method: The edge weight from the pseudo-vertex to
v is set to the maximum of the edge
weights of the edges between the vertices in nodes
to
v in the original graph.
Average method: The edge weight from the pseudo-vertex to
v is set to the average of the edge
weights of the edges between the vertices in nodes
to
v in the original graph.
An edge from v to the pseudo-vertex is set in a similar manner. For details, refer to Kang (2025).
A list consisting of three objects:
‘distmat’: A matrix representing the group reduced graph's distance matrix, where the first row and column correspond to the pseudo-vertex.
‘eta’: A vector of the group reduced graph's vertex multiplicity. The first element corresponds to the pseudo-vertex.
‘label’: A vector of the vertex names specified by nodes
.
Multiple edges (edges with the same head and tail vertices) are not allowed, because they make the edge weight setting procedure confusing.
S. Kang. Topics in Non-Euclidean Dimension Reduction. PhD thesis, Seoul National University, 2025.
L1cent()
for
L1 centrality/prestige.
L1centGROUP()
internally uses group_reduce()
.
# Group reduced graph of the 'Iron Man' series using the minimum method
vertex_weight <- igraph::V(MCUmovie)$worldwidegross
ironman_series <- c(1,3,7)
reduced_graph <- group_reduce(MCUmovie, nodes = ironman_series, eta = vertex_weight)
reduced_graph$distmat[1:3,1:3]
reduced_graph$label
# Multiplicity of the pseudo-vertex equals the sums of the replaced vertices' multiplicities
reduced_graph$eta[1] == sum(vertex_weight[ironman_series])