Skip to contents

hypergraphs 0.7.2

  • The package has no compiled code again: hg_topics() computes its expected counts in R, with the same values as 0.7.1.

hypergraphs 0.7.1

Corrections from a function-by-function audit. Results change only where they were wrong; valid input that was handled correctly gives identical output.

Speed

  • hg_communities() is faster with identical results. IRMM builds each reweighting pass’s clique reduction as a sparse matrix (about 3 times faster on icsid_tribunals), and the AMI between runs computes the expected mutual information in one vectorised pass. New parallel and n_cores arguments run the independent seeded runs with parallel::mclapply() (not on Windows); the fit is identical to the serial one. On icsid_tribunals (441 arbitrators, 742 cases), 8 cores: Infomap 34 s to 11 s, IRMM 27 s to 3 s.
  • hg_mmsbm() gains parallel and n_cores: every start’s initial values are drawn first, in order, from one stream, then the EM fits run with parallel::mclapply(). Fits and the caller’s random stream are identical to the serial run. hg_topics() runs its parallel starts through the same helper, so a failed worker raises hypergraphs_parallel_failed instead of returning an error object as a start.
  • hg_topics() and hg_topic_search() no longer exhaust memory on a large corpus. The expected counts are gathered in blocks of about 80 MB (identical values); a 6,630-document, 91,755-word corpus at k = 52 allocated about 8 GB per step before. Topic quality keeps the document x word presence sparse and densifies only the top words (it was a dense 4.9 GB matrix on that corpus), and matching topics across starts is computed for all pairs at once (0.53 s to 0.005 s per comparison at k = 52, identical values).
  • hg_cluster(algorithm = "symnmf") and hg_embed(method = "symnmf") run on a sparse hypergraph instead of refusing it with hypergraphs_dense_required: the dense similarity is built from the sparse Laplacian (up to 15,000 nodes; beyond that hypergraphs_sparse_too_large). On the corpus above, SymNMF graded memberships for k = 16 take about a minute per start.
  • hg_cluster(algorithm = "symnmf") gains parallel and n_cores: every start’s initial factor is drawn first, so parallel starts give the serial result.
  • k-means in hg_cluster() (spectral) and hg_cocluster() finishes a Hartigan-Wong start that stopped early (“Quick-TRANSfer stage steps exceeded” or the iteration limit) from the centres it reached, instead of comparing it unfinished and warning; when every start finishes the result is identical to stats::kmeans().
  • text_hypergraph() keeps a data column named doc, n_tokens or n_types as metadata input_doc, input_n_tokens, input_n_types, with a hypergraphs_renamed_column warning, instead of refusing the table.
  • Parallel runs on macOS: a forked worker the system kills (Apple’s Accelerate BLAS is not fork-safe) is rerun serially with a hypergraphs_parallel_fallback warning, and the result is unchanged.
  • hg_mmsbm() explains a collapsed membership: the rate of a hyperedge sums over its node pairs, so in hyperedges of three or more nodes the other members can explain it and a node’s activity goes to zero. The warning and the documentation say so, and point to hg_topics() for document mixtures, instead of suggesting more starts.

Package

  • The package ships one vignette, vignette("hypergraphs"). The text hypergraph guide, the COVID-19 topic walkthroughs, the text constructions and the document classification guide are articles on the package website, which keeps the source package small and its check short; the saved classification results moved with their article. hg_hypergat(), hg_neural() and the classification reader have runnable examples on the bundled forum_posts.

Construction and temporal hypergraphs

  • Hyperedges are identified by their members. Two actor/session pairs whose pasted labels coincide (a.b + c, a + b.c), a node named a + b beside the pair {a, b}, and two sequences sharing a list name were merged into one hyperedge. Sequence lists now need unique, non-empty names, and missing actor or session identifiers raise hypergraphs_bad_input.
  • Metadata columns named like a structural column (edge, node, start, weight, …) no longer replace the selected structure; they are kept under a suffixed name. Edge attributes with missing values take the first non-missing value of the edge whatever the row order.
  • Membership weights must be finite, non-negative numbers; negative, infinite, factor and character weights raise hypergraphs_bad_input.
  • network_hypergraph() reorders a matrix whose column names are a permutation of its row names, and refuses differing, duplicated or missing labels. Column labels were previously overwritten, which moved edges.
  • temporal_hypergraph() refuses clocks that fail to parse, infinite clocks and per-membership intervals that end before they start. ISO 8601 offsets (Z, +0200, +02:00) and fractional seconds are honoured, and trailing text is an error (hypergraphs_unparsed_time). An all-missing end column means every membership is open. Open and closed memberships of one hyperedge are filtered by their own spells, so snapshots no longer depend on row order.
  • hg_growth() and hg_snapshot() share one window boundary, the temporal summary() counts distinct members, and hg_edges() and the readers of an empty snapshot return typed zero-row tables.
  • The canonical node and hyperedge columns are detected without being named. knn_hypergraph() requires a whole k and finite embeddings.
  • dual_hypergraph() is the transpose of the full incidence, isolated vertices and empty hyperedges included, and a sparse dual is a complete net_hg. hg_subset() keeps planted SBM blocks aligned with the kept nodes. summary() and hg_laplacian() accept sparse hypergraphs.
  • plot(pieces = "row") places isolated nodes.

Measures, random models and null tests

  • Sparse hg_measures() equals the dense result (pairwise participation, isolate edge sizes, uniform density). hg_null_test(statistic = "density") uses the same density as hg_measures().
  • random_hypergraph(type = "sbm") and the configuration null drew from 1:x when a candidate pool held one node, producing wrong edge sizes and invented memberships. Draws from larger pools are unchanged.
  • hg_null_test() requires a whole n, and a statistic undefined on the input (avg_jaccard with fewer than two hyperedges) is NA with a hypergraphs_undefined_statistic warning.
  • Clique eigenvector centrality is the Perron vector of each connected component; power iteration oscillated on bipartite clique expansions. Z- and H-eigenvector iterations that reach max_iter warn with hypergraphs_no_converge. Subhypergraph centrality is computed per node in log space, so isolated nodes are 0 rather than -Inf. A hypergraph of singleton hyperedges has zero clique, Z and H centrality.
  • Empty hyperedges contribute nothing to Laplacians, random walks and PageRank (they produced NaN). hg_pagerank() refuses non-finite or conflicting personalized weights and, at damping = 1, disconnected input (hypergraphs_hypergraph_disconnected).
  • Assortativity is computed on centred scores, so near-regular hypergraphs of high degree are no longer reported as undefined.
  • hg_compare_communities() reports NA agreement for fits sharing fewer than two nodes and scores each medoid on the projection its fit saved. Directed citation fits have an NA quality row. edge_source is deprecated there. Duplicated node or source assignments raise hypergraphs_bad_input in every partition reader.
  • hg_mmsbm() does not declare convergence while memberships collapse.
  • The cluster plot supports more than nine clusters (Okabe-Ito colours recycle with distinct shapes), and the agreement heatmap shows negative AMI and ARI on a diverging scale.

Memory networks and simplicial complexes

  • Missing actions split a trajectory into contiguous runs. No transition crosses a gap and no state NA is created; hon(), mogen(), markov_order() and hypa() accept sequences with gaps, and hg_bootstrap() resamples whole trajectories. A real state spelled "NA" is kept.
  • State labels containing -> or the internal separators raise hypergraphs_bad_input, since higher-order node names are built from them.
  • hg_compare() averages over the rules whose context both groups observe and reports their number; with none the statistic and p-value are NA (hypergraphs_undefined_statistic). The global statistic of partially overlapping groups changes accordingly.
  • Window persistence (hg_homology() on simplicial(type = "window")) keeps essential classes essential, and every Betti row comes from the same Z/2 intervals. hg_wasserstein() treats a finite death at 0 as finite outside clique mode and computes large orders without overflow.
  • simplicial(validate = TRUE) refuses an automatic shuffle count above 100,000 and asks for an explicit n_null.
  • hg_bootstrap() with no rule above min_freq raises hypergraphs_empty_result. HONEM variance and Infomap savings are 0 on zero spectra and zero code lengths.
  • ?memory states that order is the number of conditioning states; ?hg_betti states that Betti numbers are computed over the rationals and differ from hg_homology() on torsion.

Text hypergraphs and neural classifiers

  • clean_text() keeps alphanumeric tokens (covid19, p53, covid-19) intact and replaces invalid numeric entities with U+FFFD.
  • hg_keywords() and hg_topic_quality() handle clusters without eligible words and one-word vocabularies; external keyword scores count distinct documents.
  • text_hypergraph() refuses metadata columns named doc, n_tokens or n_types.
  • hg_cocluster() checks k against the singular vectors available. topic_network() keeps isolated topics and treats constant topics as isolates (hypergraphs_constant_topics).
  • A topic model is checked against the documents, words and counts it was fitted on (net_hg_topics gains $corpus). KL-NMF ignores explicit sparse zeros. hg_membership() sums to one at coincident centres. hg_topic_sizes() refuses negative weights.
  • Label inputs of every classifier and topic reader refuse conflicting duplicates; an NA label marks a node as unlabelled. Embedding and feature row names must be unique.
  • hg_hypergat(min_count =) counts token occurrences, as documented, rather than sentences.
  • hg_neural() restores an absent random seed, HNHN operators are normalised in log space, and the confusion table keeps a class named (unscored).

Arguments

  • Counts (n, k, nstart, max_iter, n_boot, n_perm, top, dimension, …) must be whole numbers in range; fractions, -Inf and values beyond the integer range raise hypergraphs_bad_input instead of being truncated.

hypergraphs 0.6.10

  • The result classes of the memory family drop the hon prefix left over from the package’s former name: net_hon_boot is now hypergraphs_bootstrap, net_hon_boot_group hypergraphs_bootstrap_group, net_hon_compare hypergraphs_comparison, net_hon_communities hypergraphs_memory_communities and net_hon_group hypergraphs_memory_group. Code that tests these classes with inherits() needs the new names. hon() and honem() keep their names (the published BuildHON and HONEM methods), and net_hon remains the Nestimate class that hon() returns. Printed headers read “Memory-network bootstrap” and “Memory-network comparison”.

hypergraphs 0.6.9

  • The Argentina example article gains a storyline of the busiest arbitrators and restores the centrality, per-community modularity and growth tables of its first version.
  • The repository now holds only package files; development notes and local tooling are kept out of it.

hypergraphs 0.6.8

  • Test suite only: the regression test of default hull plots, whose baseline was recorded on macOS, is skipped on Linux and Windows, where the force-directed layout settles about 1e-4 away.

hypergraphs 0.6.7

  • hg_communities() on a memory network numbers communities of equal flow the same way on every platform: flows equal to 12 significant digits are ties, broken by the first node.

hypergraphs 0.6.6

  • window_hypergraph() gains collapse: FALSE keeps every window as its own hyperedge, in order, named by its positions ("1-3"), with sequence, start and end in the edge metadata.
  • plot() on a hypergraph gains type = "storyline" for hyperedges with an order (the stored order or sort_by), such as the windows of one sequence: codes become lines that the windows gather.
  • plot() of a temporal hypergraph gains type = "storyline" (Tanahashi and Ma 2012): the top nodes with the most hyperedges (default 8) are lines from their first to their last hyperedge, hyperedges are columns in order of their start, and each column gathers the lines of its members. Lines are ordered by the barycentre rule (Sugiyama et al. 1981) over repeated sweeps, keeping the ordering with the fewest crossings. start and end limit the period; edge_labels and point_size style it. spacing = "strength" brings neighbouring lines closer the more hyperedges their nodes share (a full row for none, 0.35 for the strongest tie in the plot, linear in between) without changing their order. width_by = "degree" widens each line with its node’s number of hyperedges in the period, with a width legend. Each line has an Okabe-Ito colour and a point shape, distinct for up to 72 lines, named in the legend. type is now an explicit argument of plot.net_temporal_hypergraph(), and an argument of one view given to another raises hypergraphs_bad_input.

hypergraphs 0.6.5

  • Requires Nestimate (>= 0.9.1), whose prepare() takes the timezone argument the sequence input passes; with 0.8.5 the vignettes failed.

hypergraphs 0.6.4

  • plot() on a hypergraph gains type = "incidence", the incidence matrix after UpSet (Lex et al. 2014): one row per node ordered by hyperdegree, one column per hyperedge, a bar joining each hyperedge’s members, hyperdegree bars beside the rows and size bars above the columns when sizes differ. It stays legible where hulls overlap. The new sort_by orders the columns ("size", an edge-metadata column such as a date, or one value per hyperedge; numbers largest first). color_by, labels, edge_labels, label_size, edge_label_size and legend_title apply; a hull-only argument raises hypergraphs_bad_input. Counts sort largest first; dates, text and clock columns (start, end, …) in time order.
  • plot() on a hypergraph sizes the node labels to the number of labelled nodes when label_size is not given: 4.2 mm up to 12 labels, then shrinking with the square root of the count to 2.2 mm from 44 labels on (was a fixed 4.2 mm). An explicit label_size is used as given; an invalid one raises hypergraphs_bad_input.
  • plot() of a temporal hypergraph plots its snapshot as a hypergraph with plot.net_hg() (hulls, or type = "incidence"), so the hyperedges are kept; it used to plot a pairwise projection through cograph::splot(). method is deprecated (hypergraphs_deprecated); plot(pairwise_network(hg_snapshot(x, at))) plots the projection.
  • hg_snapshot() keeps the data’s names for nodes and hyperedges, so a printed or plotted snapshot says “cases” and “arbitrator” instead of “edge” and “node”.
  • hg_edge_centrality() and hg_motifs() on a temporal hypergraph report the snapshot time as a date for a calendar hypergraph and as the number on the clock otherwise; it used to be a character label of the day offset ("3104"), also when at was given as dates.
  • plot() on a hypergraph with repeated member sets accepts node_groups: grouping the nodes now draws every hyperedge, as color_by does, instead of failing on the node sizes of the distinct-set view.
  • icsid_tribunals: respondent and subject are trimmed of the spaces the source archive pads some values with. “Argentine Republic” held 12 of Argentina’s 47 cases, so a filter on the clean name missed them; there are now 145 distinct respondents instead of 201. No other column changes.
  • hg_subset(where =) raises hypergraphs_bad_input for a value that no hyperedge takes, naming the closest values, instead of returning an empty hypergraph.

hypergraphs 0.6.3

  • plot() on a hypergraph gains node_groups: each node is coloured and shaped by its group, from a community fit (hg_communities(), hg_mmsbm(), hg_topics()) or any node/label table, so communities can be plotted over the hyperedges. The hulls turn grey unless color_by is given.

  • plot() with color_by = "size" lists only the sizes of the hyperedges it draws, and the curves of a distribution over calendar times are named by date.

  • A clock column of a hyperedge (start, end, time, session, …) is no longer chosen as the count that titles and colours the hulls; the decision figures of a temporal snapshot are readable again.

  • hg_get() on a hypergraph has a weight column only for a hypergraph of windows; other hypergraphs no longer print a column of NA.

  • An unknown what in any accessor or verb raises hypergraphs_bad_input naming the available tables.

  • hg_agreement() reads hg_mmsbm() and hg_topics() fits and text hypergraphs directly, and a table keyed by doc needs no node =.

  • hg_get() on a community fit gains converged, sort_by and top.

  • New article “Legal hypergraphs” on the tribunals of ICSID and the citations of the German Federal Constitutional Court, with hypergraph modularity.

  • New dataset forum_posts: 360 simulated forum posts by 30 students whose sequence of topics has second-order memory, generated by data-raw/forum_posts.R. It is the example corpus for hg_sequences().

  • read_hif() and write_hif() are removed, and with them the jsonlite suggestion. A hypergraph is exchanged with other packages as a netobject or a cograph_network. hg_get() on a hypergraph no longer offers what = "node_data" or "incidence_data", which only a read HIF file filled.

hypergraphs 0.6.2

  • text_hypergraph() gains separator: a delimited field such as the author keywords of a bibliographic export is read as whole-phrase terms, each a hyperedge over the papers that carry it, the keyword incidence of co-word analysis (Callon et al. 1983). Terms are lowercased and trimmed of the punctuation exports leave at their edges.

  • New hg_dictionary() labels each node by the dictionary category whose terms it carries most (Grimmer & Stewart 2013); the result is the labels input of hg_classify() and hg_hypergat().

  • Documents without a label are split = "unlabelled" in an hg_classification, so hg_get(fit, split = "unlabelled") reads the classifier’s proposals.

  • hg_get() on a text hypergraph gains node (documents by id or by a table with a node column), sort_by and top (vocabulary).

  • hg_classify() and hg_hypergat() gain holdout: a share of the labels, drawn within each class with seed, is hidden, predicted and scored. The result is an hg_classification that prints the held-out accuracy and balanced accuracy (Brodersen et al. 2010). hg_get() reads its "predictions", "accuracy", "classes" and "confusion" tables, and filters the predictions with split, correct, node, sort_by and top (per class). plot() draws the confusion table. A hg_hypergat() result retains its trained network. hg_get() computes attention on request, and plot(type = "attention") shows its diagnostic weights. plot(type = "hyperedges") plots a document’s word hypergraph.

  • labels of hg_classify() and hg_hypergat(), clusters of hg_keywords(), topic_network() and hg_topic_sizes(), and group of hg_get(what = "prevalence") accept the name of a document column (labels = "subject").

  • plot() on an hg_topics() model gains type = "prevalence" with group, the prevalence of every topic in each group.

  • hg_hypergat() now returns a reusable fitted classifier in every run. predict() classifies new documents using its trained network, frozen vocabulary and topic keywords; optional observed labels evaluate these predictions without updating the model. hg_get() reads predictions, evaluation, document text, training history and optional attention diagnostics. plot() shows confusion or training loss. The vocabulary is estimated from known labels only. Unscorable held-out and new labelled documents count as errors, and prediction preserves all new input rows.

  • HyperGAT attention diagnostics include uniform normalization baselines and the fraction of words exclusive to each edge. Attention plots show the baseline alongside the learned weights. Attention is computed only when requested and is described as an internal weight, not a prediction explanation. Legacy what extraction remains available with a warning.

  • hg_subset() gains component = "largest", which keeps the largest connected component, the input that label spreading and spectral clustering need. A subset text hypergraph now carries a matching text layer, so hg_keywords() and the other text verbs work on it.

  • stop_words_en() gains type = "snowball", the 174-word Snowball English stop list with pronouns and contractions, for chat and other informal text.

  • clean_text() repairs emoji and other characters garbled by a UTF-8-as-Windows-1252 export.

  • Labels or groups that name documents text_hypergraph() or hg_hypergat() dropped as empty are set aside with a warning in hg_keywords(), hg_topic_sizes(), topic_network(), hg_classify(), hg_neural() and hg_hypergat(), so the corpus table can be passed back whole; an id that never was a document is still an error.

  • hg_get() on an hg_topics() model gains what = "prevalence" with group =: the mean share of each topic within each group of documents, the topic prevalence by covariate of Roberts et al. (2014).

  • clean_text() gains boilerplate = TRUE, which removes publisher names, company suffixes and the phrases of licence and rights notices wherever they occur in a text, so a classifier of bibliographic abstracts does not learn the publisher and the year from the notice.

  • clean_text() removes the word “Copyright” together with the notice that follows it (“Copyright © 2020 Elsevier Ltd.” left “Copyright” behind).

  • plot() on a simplicial() result gains type =. "simplices" (the default) draws the maximal simplices as before; "summary" draws the face counts, the Betti numbers and the simplicial degree, the summary figure of the complex.

  • Input formats with their own vocabulary. Membership data name a node and a hyperedge (or from and to); event data name an action with its session and actor, as in the memory family; group is always the comparison variable, as in Nestimate. In group_hypergraph() and temporal_hypergraph(), group = (the hyperedge column) is now hyperedge = and by = is now group =. hypergraph() recognises the format from the arguments: action with session (or actor) gives one hyperedge per session, window gives windows, node with hyperedge gives membership hyperedges.

  • pairwise_network() builds the pairwise network of a hypergraph. It returns a network object (net_hg_pairwise, also netobject and cograph_network) for every projection, chosen with type = "clique" (default), "association" or "citation"; plot() plots it through cograph, hg_get() returns its edges (what = "nodes" its nodes), and hypergraph() reads it as a network. It replaces hg_project() and hg_clique_expansion(), which are removed.

  • The topic network is topic_network(), a constructor like pairwise_network(). It replaces hg_network(), its name in 0.6.1, and hg_relations(), which are removed: hg_relations(hg, clusters) is hg_topic_network(hg, clusters = clusters).

  • Constructors are bare nouns. random_hypergraph(type = "uniform" | "regular" | "gnp" | "sbm") replaces hg_sample_uniform(), hg_sample_regular(), hg_sample_gnp() and hg_sample_sbm(), with the same models and the same seeded draws; its arguments are given by name. read_hif() and write_hif() replace hg_read_hif() and hg_write_hif().

  • group_hypergraph(min_share =) keeps the frequent sets that reach a minimum support, the share of a group’s sets that contain them (Agrawal & Srikant 1994); without top, every such set is kept. It applies to data frames, clustered sequences and topic models, and print() states the rule.

  • plot() of a hypergraph packs disconnected pieces into one frame by default (pieces = "packed"), so each piece takes room in proportion to its size; pieces = "row" gives the former side-by-side frames.

  • plot() of a hypergraph whose hyperedges repeat (the trials of an event log) draws its distinct sets, each coloured by its number of copies; a hypergraph of counted sets with one group is drawn as that group; a window hypergraph is coloured by its window counts. plot() of a pairwise_network() uses a circle layout. None of these needs an argument.

  • plot() of a hypergraph takes a numeric hyperedge attribute as its count only when the attribute varies between hyperedges; a constant one, such as the session number of the runs of one session, no longer colours and titles the hyperedges. color_by = "weight" colours the hyperedges of a window_hypergraph() by their window counts.

  • tutoring_events replaces debug_events. It holds every step of the tutoring data, 84,356 events from 13,309 problem steps (20,626 trials), with each event renamed to a word of the same meaning and similar events merged (19 events become 15). debug_events held a random 4,000 steps under a coding-assistant vocabulary. Its outcome column marks a step completed (with a correct answer) or stopped (without one).

  • hg_measures() builds the hyperedge-by-hyperedge overlap matrices only for what = "overlap". The node table and the summary of a hypergraph with 20,000 hyperedges took minutes or exhausted memory; they take under a second.

  • hg_subset() keeps the window counts of a window_hypergraph() aligned with the hyperedges it keeps; printing or plotting such a subset failed.

  • hg_agreement() accepts a fit of hg_communities() and compares its medoid partition.

  • New vignette, Hypergraphs: observed groups, frequent sets, windows, projection, node measures, centrality, communities and null models on debug_events.

hypergraphs 0.6.1

  • The package is renamed from hypernets to hypergraphs. Every verb keeps its name; condition classes and result classes change their prefix from hypernets_ to hypergraphs_ (hypergraphs_bad_input, hypergraphs_result, …), so code that catches a condition by class changes with them.

  • hypergraph() is the main constructor. It reads any input and calls the constructor of that kind of data, returning its result unchanged: a data frame of groups goes to group_hypergraph() (with by or top, the frequent sets), with a clock to temporal_hypergraph(), with window, step or action to window_hypergraph(); a list of sequences to window_hypergraph(); a network (matrix, sparse matrix, netobject, cograph_network) to network_hypergraph(); a topic model or a clustering of sequences to group_hypergraph(). The specific constructors remain.

  • group_hypergraph(by =) counts frequent sets within groups. With by, each value of group (a trial, a session, a basket) is one set of actor values, and the top most frequent sets within each value of by (an outcome, a cluster) become hyperedges, read with hg_get(x, what = "sets") and drawn per value with plot(x, group = ), as for clustered sequences. The topic-combination route names its grouping column by as well. Giving top without by counts the sets over all groups. New dataset debug_events: 4,000 sessions with a coding assistant, one row per event, with runs (a stretch of a session between two verdicts) and a quick or slow group; real event sequences of another domain with every event renamed (data-raw/debug_events.R).

  • plot() of a hypergraph colours color_by = "size" discretely, one Okabe-Ito colour per size; it was a continuous scale.

  • network_hypergraph(type = "vr") raises hypergraphs_bad_input and points to simplicial(type = "vr"); it raised a plain error that said the package builds no Vietoris-Rips complex.

  • Communities of memory networks can be drawn over the transition network. plot() of a hg_communities() result can draw the network as a transition network analysis plot (TNA styling through cograph::overlay_communities()): arrows carry transition probabilities, node area follows flow, and every community is a blob around its nodes. New type = "network" draws the network of states, in which a shared state lies in two blobs; type = "states" now draws the memory nodes the same way, laid out by the walk’s transitions between them, in place of cograph’s group-ring layout. The default pebble view of the community hypergraph is unchanged, and the labels say “state” and “memory node” as the tables do.

  • hg_network() replaces hg_relations() (kept as a deprecated alias that warns with hypergraphs_deprecated and returns the identical result). Besides a partition (clusters =), it takes a topic model (topics =). Without threshold two topics are linked by the correlation of their shares (stm’s simple topicCorr(), equal on the local oracle); with threshold the weight is the number of documents in which both topics reach that share (Abuhay et al. 2017; Cassi et al. 2017), normalisable by the same similarity measures.

  • group_hypergraph(topic_model, threshold =) builds the hypergraph of topic combinations: each document is the set of its topics at the threshold, and the most frequent sets become hyperedges, counted as for clustered sequences (hg_get(x, what = "sets")). by = counts them within a column of the documents table (a year, an author); min_size and top = Inf keep the multi-topic sets and all of them. Hypergraphs of clustered sequences now print their source.

  • hg_sequences(topics =) builds sequences from each document’s main topic, grouped by any column of the documents table.

  • hg_markov_stability() reads only the possible transitions of a matrix when it checks irreducibility, so an unnormalised matrix warns once with normalize = TRUE (it warned twice) and is refused without a warning with normalize = FALSE (it warned that it was normalising).