git clone https://github.com/Mircus/S.H.E.
cd S.H.E
pip install -e . # core only
pip install -e ".[dev]" # adds pytest, ruffRequires Python >= 3.10. Tested with TopoNetX 0.2.x on Python 3.11.
import she
print(she.__version__) # 0.1.2The main objects you will use:
| Object | Purpose |
|---|---|
SHEHyperstructure |
Build a decorated higher-order relational structure |
rank_diffusers |
Rank simplices by Hodge-Laplacian diffusion centrality |
find_bridge_simplices |
Find simplices spanning multiple communities |
group_cohesion |
Score structural cohesion of a candidate group |
rolling_windows / decay_window |
Temporal slicing and decay-weighted views |
ranked_items_to_csv |
Export results to CSV or JSON |
Run the smallest nontrivial complex:
python examples/toy_triangle.pyThis builds a triangle (three nodes, three edges, one face), computes Hodge Laplacians at each dimension, and prints them. If this runs, your install works.
python examples/social_media_diffusers.pyThis builds a two-community social scenario and compares graph centrality (eigenvector on the 1-skeleton) with simplex-level analysis:
- Graph centrality ranks a high-degree hub first.
- Bridge detection surfaces a cross-community triad as the top bridge.
- Group cohesion scores the triad as structurally tight.
These are heuristic scores. The point is that graph-only metrics never see group-level structures, while SHE makes them queryable.
Open notebooks/eu_email_analysis.ipynb — it analyses the SNAP EU Email
network (20 researchers, 812 interactions, 27 months) with:
- Louvain community detection
- Temporal bridge/cohesion tracking over rolling windows
- Decay-weighted windowing
- Matplotlib plots of bridge scores and cohesion over time
- Social Diffusers Tutorial — deeper look at the social-analysis features
- API Overview — public API map
- Social Media Use Case — the conceptual framing behind the diffusers example