This repository contains the scripts that generate the main figures reported in the paper:
Hanbaek Lyu, Facundo Memoli, and David Sivakoff,
"Sampling random graph homomorphisms and applications to network data analysis" (arXiv 2019)
For a more user-friendly repository, please see NNetwork package repository.
Some of our code is also available as the python package NNetwork on pypi.
First add network files for UCLA, Caltech, MIT, Harvard to Data/Networks_all_NDL
Ref: Amanda L. Traud, Eric D. Kelsic, Peter J. Mucha, and Mason A. Porter,
Comparing community structure tocharacteristics in online collegiate social networks. SIAM Review, 53:526–543, 2011.
Then copy & paste the ipynb notebook files into the main folder. Run each Jupyter notebook and see the instructions therein.
- src.dyn_emb.py : main source file for MCMC motif sampling and computing MACC and conditional homomorphism density profiles.
- src.dyn_emb_app.py: application script of main algorithms
- src.dyn_emb_facebook.py: application script for Facebook100 dataset
- src.WAN_classifier.py: application script for Word Adjacency Networks dataset
- src.helper_functions.py: helper functions for plotting and auxiliary computation
- motif_sampling_ex.ipynb: Jupyter notebook for motif sampling plots
- subgraph_classification.ipynb: Jupyter notebook for subgraph classification experiments
- Hanbaek Lyu - Initial work - Website
This project is licensed under the MIT License - see the LICENSE.md file for details