One verb, two estimators, chosen by the class of x:
- a hypergraph (
net_hg, e.g. fromtext_hypergraph(),window_hypergraph()) eigenvector-style hypergraph centralities – clique-motif, Z- and H-eigenvector, EDVW PageRank, subhypergraph and Katz; see
hg_centrality.net_hg().- a memory network (
net_hon, fromhon()) PageRank, betweenness and closeness of the higher-order topology, projected onto the first-order states; see
hg_centrality.net_hon().
Each method keeps its own arguments; passing an argument that only the
other method takes raises hypernets_bad_input.
Value
A base data.frame, one row per node (or per state), with one
column per requested centrality. Any other input raises
hypernets_bad_input.
Examples
hg <- text_hypergraph(c(a = "salt and soup", b = "soup and stars"))
hg_centrality(hg, type = "clique")
#> node clique
#> 1 a 0.7071068
#> 2 b 0.7071068
seqs <- list(c("a", "b", "c", "a", "b", "c"), c("x", "b", "d", "x", "b", "d"))
hg_centrality(hon(seqs, max_order = 2), type = "pagerank")
#> state pagerank
#> 1 a 0.1719145
#> 2 b 0.3222546
#> 3 c 0.1669582
#> 4 d 0.1669582
#> 5 x 0.1719145