View source: R/hypergraph_centrality.R
| hypergraph_centrality | R Documentation |
Computes one or more eigenvector-style centralities on a net_hypergraph: clique-motif (CEC), Z-eigenvector (ZEC), and H-eigenvector (HEC). Each variant captures influence differently - CEC flattens group structure via clique expansion, while ZEC and HEC propagate through the higher-order groups directly.
hypergraph_centrality(
hg,
type = c("clique", "Z", "H"),
max_iter = 1000L,
tol = 1e-08,
normalize = TRUE
)
hg |
A |
type |
Character vector, any subset of |
max_iter |
Maximum number of power-iteration steps. Default
|
tol |
Convergence tolerance on the L1 change between successive
iterates. Default |
normalize |
Logical. If |
Clique-motif eigenvector centrality (CEC): forms the
clique-expanded pairwise graph W where
W_{ij} = |\{e : i, j \in e\}| and returns the leading
eigenvector of W. Equivalent to running
igraph::eigen_centrality() on clique_expansion() output.
Z-eigenvector centrality (ZEC): solves the linear eigen-equation on the hyperedge tensor,
\lambda\, x_i \;=\; \sum_{e \ni i}\; \prod_{j \in e,\; j \neq i} x_j,
via power iteration. Works for hypergraphs with mixed edge sizes.
H-eigenvector centrality (HEC): solves the power-k-1 eigen-equation,
\lambda\, x_i^{k-1} \;=\; \sum_{e \ni i}\; \prod_{j \in e,\; j \neq i} x_j.
For uniform hypergraphs (all hyperedges of size k), this is
equivalent to normalizing the ZEC update by the geometric-mean
exponent 1/(k-1). For mixed sizes, the effective exponent is
taken from the largest hyperedge; expect slightly different rankings
from ZEC in the mixed case.
A named list; one component per requested type. Each
component is a named numeric vector of length hg$n_nodes.
The "clique" (CEC) variant is validated against
igraph::eigen_centrality (cosine ~ 1). The "Z" and "H" variants are
(experimental) - validated only against a clean-room list-based
tensor power iteration (same operator, different loop structure); no
R package exposes tensor eigenvectors as a primitive for independent
comparison.
Benson, A. R. (2019). Three hypergraph eigenvector centralities. SIAM Journal on Mathematics of Data Science 1(2), 293-312. arXiv:1807.09644.
build_hypergraph(), clique_expansion(),
hypergraph_measures().
df <- data.frame(
player = c("A", "B", "C", "A", "B", "D", "C", "D", "E"),
session = c("S1", "S1", "S1", "S2", "S2", "S3", "S3", "S3", "S3")
)
hg <- bipartite_groups(df, "player", "session")
cent <- hypergraph_centrality(hg)
# Compare rankings across the three variants
do.call(cbind, cent)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.