This repository accompanies the article "The simpliciality of higher-order networks" by Nicholas Landry, Jean-Gabriel Young, and Nicole Eikmeier.
- The
Datafolder contains all of the global characteristics of the datasets (shown in Table 1 in the text), theFiguresfolder contains PDF and PNG files for each of the figures in the paper, and thetestsfolder contains unit tests to validate the code written for generating our results. - The
sod(Simpliciality of Data) folder contains all of the measures of simpliciality used in the paper as well as any utility functions.
- To run the unit tests and use the package, you need to pip install the package locally. Navigate to the local folder on your computer and run
pip install -e .
if you wish to be able to edit the distribution and
pip install .
if you don't.
- To run the unit tests, run
pytestin the command line. - The package is referenced as
sod(Simpliciality of Data) when accessing the functionality. - There are also distance versions of some simpliciality measures in the code.
Note: sod requires Python 3.10+!
draw.pyprovides some additional functionality for drawing the multilayer hypergraph visualizations.empirical_simpliciality.pymeasures the simpliciality (all three measures) of the empirical datasets and stores the results in a JSON file in theDatafolder.generate_dcsbm_parameters.pyinfers the parameters of the biSBM for a given empirical dataset for use in the model fitting script and stores as a JSON file in theDatafolder.model_fitting.pygenerates realizations of the generative models, measures the resulting simpliciality, and then stores the results in a JSON file in theDatafolder.simplicial_assortativity.pygenerates the empirical values of simplicial assortativity contained in Table 2.setup.pyallows users to pip install this package.
plot_empiricial_simpliciality.ipynbgenerates a plot of the simpliciality for empirical datasets, which is unused in the text. It also printsplot_model_fitting.ipynbgenerates Fig. 2 in the text.local_simpliciality.ipynbgenerates Fig. 3 in the text as well as corresponding local measures.dataset_characteristics.ipynbgenerates the results in Table 1 except the measures of simpliciality.illustrations.ipynbgenerates the diagrams used in Fig. 1 in the text.simpliciality_correlation.ipynbgenerates the correlation coefficients referenced in the text.cm_convergence.ipynbgenerates Fig. 4 in the text.print_simplicial_assortativity.ipynbprints the results fromsimplicial_assortativity.pyas Table 2.