Repository where we show how the method HOSGNS (Higher-Order Skip-Gram with Negative Sampling) can be applied to face-to-face proximity data (http://www.sociopatterns.org/), and to synthetic data generated by an agent-based model (https://github.com/BDI-pathogens/OpenABM-Covid19).
If you use the code in this repository, please cite us:
@article{piaggesi2022time,
title={Time-varying graph representation learning via higher-order skip-gram with negative sampling},
author={Piaggesi, Simone and Panisson, Andr{\'e}},
journal={EPJ Data Science},
volume={11},
number={1},
pages={33},
year={2022},
publisher={Springer Berlin Heidelberg}
}
The data/
folder contains preprocessed time-varying proximity data and corresponding metadata with class labels (where they are available). The original raw data can be found in http://www.sociopatterns.org/datasets/. Furthermore it contains SIR spreading realizations on each presented dataset.
The code/
folder contains Jupyter notebooks to execute the method on presented datasets:
- MakeVariousSupraNetworks: To build and save networkx supra-adjacency graphs.
- MakeVariousSupraSparseTensors: To build co-occurrence tensors from supra-adjacency graphs (not needed for synthetic datasets).
- RemoveEvents: To remove events from empirical temporal graphs and save results.
- To embed different higher-order representations and test them in downstream tasks.
The repository required packages can be installed from requirements.txt
. To run the code on OpenABM (last two notebooks) the libraries GEM and SNAP are also needed. The code has been tested under Python 3.6.
-
Cattuto, C., Van den Broeck, W., Barrat, A., Colizza, V., Pinton, J. F., & Vespignani, A. (2010). Dynamics of person-to-person interactions from distributed RFID sensor networks. PloS one, 5(7), e11596.
-
Hinch, Robert, et al. "OpenABM-Covid19—An agent-based model for non-pharmaceutical interventions against COVID-19 including contact tracing." PLoS computational biology 17.7 (2021): e1009146.