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, weight_transform)# S3 method for igraph
group_reduce(
g,
nodes,
eta = NULL,
method = c("minimum", "maximum", "average"),
weight_transform = NULL
)
# S3 method for matrix
group_reduce(g, nodes, eta = NULL, method = "minimum", weight_transform = NULL)
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.
An igraph graph object or a distance matrix. Here, the
(i,j) component of the distance
matrix is the geodesic distance from the
ith vertex to the
jth vertex.
A vector of integers. Each integer indicates the index of the vertex.
An optional nonnegative multiplicity (weight) vector for (vertex)
weighted networks. The sum of its components must be positive. If set to
NULL (the default), all vertices will have the same positive weight
(multiplicity) of 1, i.e., g is treated as a vertex unweighted graph. The
length of the eta must be equivalent to the number of vertices.
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 matrix class only supports the minimum option. This
is because it is not possible to derive the group reduced graph's distance
matrix from the original distance matrix when using the maximum or average
method. On the other hand, the group reduced graph's distance matrix can be
derived from the original distance matrix when the minimum method is used.
See the discussion in Kang (2025).
minimum (the default): the minimum method is used in setting the edge weights.
maximum: the maximum method is used in setting the edge weights.
average: the average method is used in setting the edge weights.
An optional function to transform the edge weights
when g is an igraph object and an edge weight attribute exists. This
argument is ignored when g is a distance matrix.
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).
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])
Run the code above in your browser using DataLab