Skip to content

simonepiaggesi/hosgns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Time-varying graph representation learning via higher-order skip-gram with negative sampling

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}
}

Repository organization

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:

  1. MakeVariousSupraNetworks: To build and save networkx supra-adjacency graphs.
  2. MakeVariousSupraSparseTensors: To build co-occurrence tensors from supra-adjacency graphs (not needed for synthetic datasets).
  3. RemoveEvents: To remove events from empirical temporal graphs and save results.
  4. To embed different higher-order representations and test them in downstream tasks.

Requirements

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.

References

  1. 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.

  2. 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.

About

Data and code repository from "Time-varying graph representation learning via higher-order skip-gram with negative sampling"

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published