Data and code for the paper "Hyper-cores promote localization and efficient seeding in higher-order processes"
This repository contains the data and code associated to the paper:
Marco Mancastroppa, Iacopo Iacopini, Giovanni Petri and Alain Barrat, "Hyper-cores promote localization and efficient seeding in higher-order processes", Nature Communications 14, 6223 (2023)
The data that support the findings of this study are publicly available:
- SocioPattern data sets (InVS15, LH10, SFHH, LyonSchool, Thiers13) by the SocioPatterns project. Data source here;
- Utah’s schools data sets (Mid1, Elem1) by the Contacts among Utah's School-age Population (CUSP), presented in Toth et al. J. R. Soc. Interface 12: 20150279 (2015). Data source here;
- Email-EU data set, presented in A. Paranjape et al. Proceedings of the Tenth ACM International Conference on Web Search and Data Mining, p. 601–610 (2017). Data source here and here;
- Email-Enron data set, presented in A. R. Benson et al., PNAS 115, E11221 (2018). Data source here;
- Political interactions data sets (congress-bills, senate-bills, house-committees, senate-committees), presented in P. S. Chodrow et al., Science Advances 7, eabh1303 (2021), C. Stewart III et al., Congressional committee assignments, 103rd to 114th congresses (1993–2017), J. H. Fowler, Social Networks 28, 454 (2006) and J. H. Fowler, Political Analysis 14, 456–487 (2006). Data source here and here;
- Online interactions data sets (music-review, algebra-questions, geometry-questions), presented in J. Ni et al., Proceedings of the 2019 EMNLP-IJCNLP, pp. 188–197 (2019) and I. Amburg et al., Proceedings of the 2022 SIAM International Conference on Data Mining (SDM), pp. 145–153 (2022). Data source here;
- Ecological data sets (M_PL_015_ins, M_PL_015_pl, M_PL_062_ins, M_PL_062_pl) by the Web of life: ecological network database. Data source here.
The original and processed data are collected in the Data
folder.
The Data
folder contains the preprocessing codes to obtain the empirical static hypergraphs from the various datasets. The code to preprocess the SocioPatterns datasets and Utah's schools datasets is an adaptation of the preprocessing procedure of I. Iacopini et al. Commm Phys 5, 64 (2022) (the original procedure can be found at https://github.com/iaciac/higher-order-NG).
The Hyper-core_decomposition
folder contains the code to obtain the (k,m)-hyper-core decomposition of static hypergraphs, and also the code for the k-core and s-core decompositions of the associated projected graphs.
The Hypergraph_randomization
folder contains the code to obtain a randomized realization of static hypergraphs, through a hyperedge reshuffling procedure. The code is an adaptation of the reshuffling procedure proposed in N. W. Landry et al., Chaos: An Interdisciplinary Journal of Nonlinear Science 32, 053113 (2022) (the original procedure can be found at https://github.com/nwlandry/hypergraph-assortativity).
The Nonlinear_higher-order_contagion
folder contains the code to simulate the SIS and SIR higher-order nonlinear contagion processes on static hypergraphs.
The Threshold_higher-order_contagion
folder contains the code to simulate the SIS and SIR higher-order threshold contagion processes on static hypergraphs.
The code to simulate the naming-game process on hypergraphs with committed minority is available at https://github.com/iaciac/higher-order-NG.
The code uses the CompleX Group Interactions (XGI) library in Python https://xgi.readthedocs.io.
XGI repository: https://github.com/xgi-org/xgi.
Landry, N. W., Lucas, M., Iacopini, I., Petri, G., Schwarze, A., Patania, A., & Torres, L. (2023). XGI: A Python package for higher-order interaction networks. Journal of Open Source Software, 8(85), 5162. https://doi.org/10.21105/joss.05162.