Skip to contents

Package

hypernets hypernets-package
hypernets: Higher-Order Network Analysis

Reading results

One reader for every object.

hg_get()
Read a table from any hypernets object
hg_compare_communities() print(<hypernets_community_comparison>) hg_get(<hypernets_community_comparison>) plot(<hypernets_community_comparison>)
Compare community structure across representations
print(<hg_communities>) hg_get(<hg_communities>) plot(<hg_communities>)
Tables of a hypergraph community ensemble
hg_get(<net_hg>)
Tables of a hypergraph
hg_get(<net_hg_cluster>)
Assignment table of a hypergraph clustering fit
hg_get(<net_hg_measures>)
Tables of a hypergraph measures fit
hg_get(<net_hg_transduction>)
Tables of a hypergraph transduction fit
hg_get(<net_hon>)
Tables of a higher-order network
hg_get(<net_hon_boot>)
Inference table of a HON bootstrap
hg_get(<net_hon_communities>)
Tidy tables of a memory-network community result
hg_get(<net_hon_compare>)
Edge table of a HON comparison
print(<net_hon_group>) hg_get(<net_hon_group>) print(<net_hon_boot_group>) hg_get(<net_hon_boot_group>)
Tables of a group model of memory networks
hg_get(<net_honem>)
Tables of a higher-order network embedding
hg_get(<hypernets_hypa>) hg_get(<net_hypa>)
Tables of a path-anomaly (HYPA) fit
hg_get(<net_markov_order>)
Tables of a Markov order test
hg_get(<net_markov_order_group>)
Tables of a grouped Markov order test
hg_get(<net_markov_stability>)
Tables of a Markov stability analysis
hg_get(<net_mogen>)
Tables of a multi-order generative model
hg_get(<net_path_dependence>)
Per-context table of a path-dependence analysis
hg_get(<net_temporal_hypergraph>)
Tidy tables of a temporal hypergraph
hg_get(<persistence_landscape>)
Table of a persistence landscape
hg_get(<persistent_homology>)
Tables of a persistent homology result
hg_get(<q_analysis>)
Tables of a q-analysis
hg_get(<simplicial_complex>)
Tables of a simplicial complex
hg_get(<text_hypergraph>)
Tidy tables of a text hypergraph
hg_mmsbm() hg_get(<net_hg_mmsbm>) print(<net_hg_mmsbm>) plot(<net_hg_mmsbm>)
Mixed-membership communities of a hypergraph (Hy-MMSBM)
hg_motifs() hg_get(<hypernets_motifs>) plot(<hypernets_motifs>)
Y, T and O motif census with a hypergraph configuration null
hg_topics() hg_get(<net_hg_topics>) print(<net_hg_topics>) plot(<net_hg_topics>)
Mixed-membership topic model of a hypergraph
hg_get(<hypernets_result>) print(<hypernets_result>) plot(<hypernets_result>)
Print a result of an imported estimator
hg_get(<hypernets_summary>) print(<hypernets_summary>) summary(<hypernets_result>) summary(<hypernets_hypa>) summary(<hypernets_community_comparison>) summary(<hg_communities>) summary(<net_hg_mmsbm>) summary(<hypernets_motifs>) summary(<net_hon_communities>) summary(<net_hon_boot_group>) summary(<net_hon_group>) summary(<net_hon_boot>) summary(<net_hon_compare>) summary(<hypernets_simplicial>) summary(<net_hg_topics>)
Summaries of results
simplicial() plot(<hypernets_simplicial>) hg_get(<hypernets_simplicial>) print(<hypernets_simplicial>)
Simplicial complex from sequences, a network or a memory network

Memory networks

A node is a state plus the memory of how it was reached.

sequence-input
Sequence input shared by the sequence verbs
hon()
Higher-order network (HON) from sequences
honem()
Embedding of a higher-order network (HONEM)
mogen()
Multi-order generative model (MOGen) of sequences
hypa()
Hypergeometric anomalies of paths or of co-occurring node pairs
hypa(<default>) print(<hypernets_hypa>)
Path anomalies (HYPA) in sequences
hg_centrality()
Centralities of a hypergraph or a memory network
hg_centrality(<net_hon>)
Higher-order centralities with first-order projection
hg_communities()
Communities of a hypergraph or a memory network
hg_communities(<net_hon>)
Memory-network communities with the map equation
hg_bootstrap()
Bootstrap inference for higher-order network rules
hg_compare()
Permutation comparison of the rules of two groups
markov_order()
Test the Markov order of sequences
hg_markov_stability()
Markov stability of the states of a transition network
memory()
Per-context path dependence

Simplicial complexes

A set of mutually related nodes together with every subset.

simplicial() plot(<hypernets_simplicial>) hg_get(<hypernets_simplicial>) print(<hypernets_simplicial>)
Simplicial complex from sequences, a network or a memory network
hg_betti()
Betti numbers of a simplicial complex
hg_euler()
Euler characteristic of a simplicial complex
hg_degree()
Simplicial degree of every node
hg_qanalysis()
Q-analysis of a simplicial complex
hg_homology()
Persistent homology of a weighted network or a distance matrix
hg_landscape()
Persistence landscape of a persistence diagram
hg_bottleneck()
Bottleneck distance between persistence diagrams
hg_wasserstein()
Wasserstein Distance Between Persistence Diagrams

Hypergraphs

An arbitrary set of nodes bound as a unit.

Constructors

network_hypergraph() print(<net_hg>) summary(<net_hg>)
Higher-order hypergraph from a network's clique structure
window_hypergraph()
Windowed Sequence Hyperedges
group_hypergraph()
Hypergraph from co-occurrence data or an edge list
knn_hypergraph()
Build a k-nearest-neighbor hypergraph from embeddings
dual_hypergraph()
Dual of a hypergraph
temporal_hypergraph()
Temporal hypergraph from an edge list or co-occurrence data
hg_snapshot()
Extract one snapshot from a temporal hypergraph
hg_snapshots()
Extract a sequence of temporal-hypergraph snapshots
hg_subset()
Sub-hypergraph by hyperedges, nodes or hyperedge attributes
hg_sample_gnp()
Sample Bernoulli-Incidence Random Hypergraphs
hg_sample_sbm()
Sample Stochastic-Block-Model Hypergraphs
hg_sample_uniform() hg_sample_regular()
Sample Uniform or Regular Random Hypergraphs
hg_write_hif() hg_read_hif()
Read and write the Hypergraph Interchange Format (HIF)

Measures and centralities

print(<net_hg_measures>) hg_measures()
Structural measures for a hypergraph
hg_centrality(<net_hg>)
Hypergraph eigenvector centralities
hg_pagerank()
Hypergraph PageRank with edge-dependent vertex weights
hg_transitivity()
Local clustering coefficients of a hypergraph
hg_assortativity()
Degree assortativity of a hypergraph
hg_degree_correlation()
Correlation of hyperdegrees across interaction orders
hg_edges()
Hyperedge-level measures, as a tidy table
hg_edge_centrality()
s-betweenness and s-closeness centrality of hyperedges
hg_growth() plot(<hypernets_series>)
Growth of a temporal hypergraph over time
hg_representations()
Graph and hypergraph representations of the same data
hg_motifs() hg_get(<hypernets_motifs>) plot(<hypernets_motifs>)
Y, T and O motif census with a hypergraph configuration null

Spectral methods

hg_laplacian()
Normalized hypergraph Laplacian
hg_cluster()
Spectral or symmetric-NMF clustering of hypergraph vertices
hg_joint_cluster()
Joint NMF clustering with an auxiliary vertex relation
hg_embed()
Low-Dimensional Hypergraph Embedding
hg_classify()
Transductive label spreading on a hypergraph

Projections

hg_clique_expansion()
Clique expansion of a hypergraph
hg_project()
Project a hypergraph onto a weighted graph
hg_line_graph()
The s-line graph of a hypergraph

Communities

hg_communities(<net_hg>)
Stable Infomap communities of a hypergraph projection
hg_community_quality()
Quality of a projected-hypergraph partition
hg_modularity()
Hypergraph modularity of a partition
hg_compare_communities() print(<hypernets_community_comparison>) hg_get(<hypernets_community_comparison>) plot(<hypernets_community_comparison>)
Compare community structure across representations

Null models and neural networks

hg_null_test()
Degree-preserving null-model test of hypergraph structure
hypa(<net_hg>)
Hypergeometric anomaly detection for co-occurring node pairs
hg_neural()
Hypergraph neural network classifier (HGNN)
hg_hypergat() text_hypergat()
HyperGAT document classifier
heterogeneous_hgat()
Heterogeneous graph attention classifier (HGAT)
hg_hypergcn()
HyperGCN node classifier
hg_hnhn()
HNHN node classifier
hg_allset()
AllSet hypergraph node classifier

Text hypergraphs

A corpus as a weighted document-word hypergraph, analysed with tidy verbs.

clean_text()
Clean a corpus before building a text hypergraph
text_hypergraph()
Build a weighted hypergraph from a text corpus
stop_words_en()
English function-word stop list
print(<net_hg_measures>) hg_measures()
Structural measures for a hypergraph
hg_centrality()
Centralities of a hypergraph or a memory network
hg_cluster()
Spectral or symmetric-NMF clustering of hypergraph vertices
hg_keywords() print(<hypernets_keywords>) plot(<hypernets_keywords>)
Characteristic words (keywords) per cluster
hg_sequences()
Per-actor state sequences from a clustered corpus
hg_relations()
Relations between topics: a weighted network of shared vocabulary
hg_topic_sizes() plot(<hypernets_topic_sizes>)
Topic sizes
hg_topics() hg_get(<net_hg_topics>) print(<net_hg_topics>) plot(<net_hg_topics>)
Mixed-membership topic model of a hypergraph
hg_topic_search() plot(<hypernets_topic_search>)
Choose the number of topics by coherence and exclusivity
hg_topic_quality() plot(<hypernets_topic_quality>)
Topic coherence and exclusivity
hg_cocluster()
Co-clustering of nodes and hyperedges (documents and words)
hg_membership() plot(<hypernets_membership>)
Soft topic membership from the spectral embedding
hg_mmsbm() hg_get(<net_hg_mmsbm>) print(<net_hg_mmsbm>) plot(<net_hg_mmsbm>)
Mixed-membership communities of a hypergraph (Hy-MMSBM)
hg_stability()
Stability of a hypergraph clustering across resolutions
hg_agreement()
Agreement between two labelings of the same nodes
hg_seeds()
Seed labels from a clustering, for spreading or training
hg_classify()
Transductive label spreading on a hypergraph

Methods

hg_compare_communities() print(<hypernets_community_comparison>) hg_get(<hypernets_community_comparison>) plot(<hypernets_community_comparison>)
Compare community structure across representations
print(<hg_communities>) hg_get(<hg_communities>) plot(<hg_communities>)
Tables of a hypergraph community ensemble
print(<net_hon_group>) hg_get(<net_hon_group>) print(<net_hon_boot_group>) hg_get(<net_hon_boot_group>)
Tables of a group model of memory networks
hg_keywords() print(<hypernets_keywords>) plot(<hypernets_keywords>)
Characteristic words (keywords) per cluster
print(<net_hg_measures>) hg_measures()
Structural measures for a hypergraph
hg_mmsbm() hg_get(<net_hg_mmsbm>) print(<net_hg_mmsbm>) plot(<net_hg_mmsbm>)
Mixed-membership communities of a hypergraph (Hy-MMSBM)
hg_topics() hg_get(<net_hg_topics>) print(<net_hg_topics>) plot(<net_hg_topics>)
Mixed-membership topic model of a hypergraph
hypa(<default>) print(<hypernets_hypa>)
Path anomalies (HYPA) in sequences
network_hypergraph() print(<net_hg>) summary(<net_hg>)
Higher-order hypergraph from a network's clique structure
hg_get(<hypernets_result>) print(<hypernets_result>) plot(<hypernets_result>)
Print a result of an imported estimator
print(<net_hg_cluster>)
Print method for net_hg_cluster
print(<net_hg_transduction>)
Print method for net_hg_transduction
print(<net_hon_boot>)
Print method for net_hon_boot
print(<net_hon_communities>)
Print a memory-network community result
print(<net_hon_compare>)
Print method for net_hon_compare
print(<text_hypergraph>)
Print a text hypergraph
hg_get(<hypernets_summary>) print(<hypernets_summary>) summary(<hypernets_result>) summary(<hypernets_hypa>) summary(<hypernets_community_comparison>) summary(<hg_communities>) summary(<net_hg_mmsbm>) summary(<hypernets_motifs>) summary(<net_hon_communities>) summary(<net_hon_boot_group>) summary(<net_hon_group>) summary(<net_hon_boot>) summary(<net_hon_compare>) summary(<hypernets_simplicial>) summary(<net_hg_topics>)
Summaries of results
simplicial() plot(<hypernets_simplicial>) hg_get(<hypernets_simplicial>) print(<hypernets_simplicial>)
Simplicial complex from sequences, a network or a memory network
summary(<net_hg_cluster>)
Summary method for net_hg_cluster
summary(<net_hg_transduction>)
Summary method for net_hg_transduction
hg_growth() plot(<hypernets_series>)
Growth of a temporal hypergraph over time
hg_membership() plot(<hypernets_membership>)
Soft topic membership from the spectral embedding
hg_motifs() hg_get(<hypernets_motifs>) plot(<hypernets_motifs>)
Y, T and O motif census with a hypergraph configuration null
hg_topic_quality() plot(<hypernets_topic_quality>)
Topic coherence and exclusivity
hg_topic_search() plot(<hypernets_topic_search>)
Choose the number of topics by coherence and exclusivity
hg_topic_sizes() plot(<hypernets_topic_sizes>)
Topic sizes
plot(<net_hg>)
Plot a hypergraph with hyperedges as pebbles
plot(<net_hg_cluster>)
Plot method for net_hg_cluster
plot(<net_hg_transduction>)
Plot method for net_hg_transduction
plot(<net_hon_boot>)
Plot method for net_hon_boot
plot(<net_hon_communities>)
Plot memory-network communities
plot(<net_hon_compare>)
Plot method for net_hon_compare
plot(<net_temporal_hypergraph>)
Plot a temporal-hypergraph snapshot through cograph

Data

human_long ai_long
Human-AI Vibe Coding Interaction Data (Long Format)
covid_abstracts
COVID-19 education research abstracts
covid_sample
A random sample of 1,000 COVID-19 education research abstracts
covid_embeddings
Sentence embeddings of the COVID-19 abstracts
icsid_tribunals
ICSID arbitration tribunals, one row per seat
gfcc_decisions
Decisions of the German Federal Constitutional Court
gfcc_citations
Citation blocks of the German Federal Constitutional Court
ring_sequences
Simulated sequences with planted memory modules
ring_communities
Planted communities of the ring sequences