Generate Candidate Hyperedges from a Pairwise Network
Source:R/multiplets_generation.R
generate_candidate_multiplets.RdGenerates candidate variable multiplets using a sparse Gaussian graphical model estimated with EBICglasso, followed by maximal clique extraction and subset enumeration.
Usage
generate_candidate_multiplets(
data,
k = 3,
ebic.gamma = 0.5,
min_clique_size = 2,
cor_matrix = NULL,
n_obs = nrow(data)
)Arguments
- data
Numeric data matrix or data frame. Rows correspond to observations and columns to variables.
- k
Target hyperedge order. Must be an integer between 3 and the number of variables.
- ebic.gamma
EBIC tuning parameter used in
EBICglasso.- min_clique_size
Minimum maximal clique size used as candidate seeds.
- cor_matrix
Optional correlation matrix used for EBICglasso. If NULL, Pearson correlations are computed from
data.- n_obs
Effective sample size supplied to EBICglasso. Defaults to the number of rows in
data.
Value
A list containing:
- candidates
Candidate variable subsets.
- adjacency_matrix
Estimated EBICglasso adjacency matrix.
- n_candidates
Number of generated candidates.
Details
This procedure is inspired by the candidate-selection strategy proposed by Possenti et al. (2026) for reducing the combinatorial search space of higher-order interactions.
The algorithm consists of:
Estimating a pairwise network using EBICglasso;
Extracting maximal cliques from the network;
Generating candidate multiplets from cliques;
Removing duplicated candidates.
Compared with exhaustive enumeration, this approach focuses the search on densely connected regions of the psychometric network and substantially reduces computational cost.
This implementation provides a simplified clique-based search inspired by
Possenti et al. (2026). Each candidate is a k-node subset of a maximal clique.
Larger cliques are decomposed, and cliques smaller than k are skipped.
Candidates are sorted and deduplicated. No neighboring-node expansion is
performed. If no candidates are found, an empty list is returned with a
warning; exhaustive search is not substituted.
For a community-guided candidate strategy, see
generate_candidate_multiplets_possenti.