Skip to content

Analytics Engine

HyperMesh DB includes a built-in hypergraph analytics engine with 25 measures, computed in-process using SciPy sparse matrices.

analytics = db.analytics("CoProximity")
# Structural
print(analytics.density())
print(analytics.uniformity())
# Centrality
pr = analytics.pagerank() # dict: node_id → score
bc = analytics.betweenness()
# Spectral
sg = analytics.spectral_gap()
ac = analytics.algebraic_connectivity()
# Temporal
tb = analytics.temporal_burstiness()
ta = analytics.temporal_activity()
Terminal window
curl -H "X-API-Key: hmdb_yourkey" \
http://localhost:8000/v1/analytics/CoProximity/pagerank
const pr = await db.analytics("CoProximity", "pagerank");
console.log(pr.result); // { "1": 0.23, "2": 0.31, ... }
MeasureDescription
densityFraction of all possible hyperedges that are present
uniformityProportion of hyperedges with the modal edge size
overlapping_coefficientMean node participation across hyperedges
redundancyFraction of node pairs that share multiple hyperedges
isolated_nodesCount of nodes in no hyperedge
isolated_edgesCount of hyperedges with no shared nodes
MeasureDescription
node_degreeDict: node → number of hyperedges it belongs to
edge_sizeDict: edge_id → number of members
MeasureDescription
betweennessHyperedge betweenness centrality
closenessCloseness centrality via star-expansion
pagerankPageRank over the bipartite hyperedge graph
harmonic_centralityHarmonic mean of inverse distances
clique_numberSize of the largest clique in the 2-section graph
MeasureDescription
spectral_gapλ₂ − λ₁ of the normalised hypergraph Laplacian
algebraic_connectivitySecond-smallest Laplacian eigenvalue (Fiedler value)
MeasureDescription
zhou_clusteringZhou et al. 2006 hypergraph clustering coefficient
pairwise_clusteringFraction of co-member pairs that share another hyperedge
modularityLouvain-style hypergraph modularity
MeasureDescription
s_adjacencys-adjacency matrix (edges sharing ≥ s nodes)
s_distanceShortest s-walk distance between all hyperedge pairs
s_connected_componentsNumber of s-connected components
s_diameterDiameter of the largest s-component
MeasureDescription
temporal_activityDict: node → number of distinct time buckets active
temporal_burstinessCoefficient of variation of inter-event times per node
temporal_corenessk-core decomposition of the temporal projection