This repo is the collection of the codes used in the experiments of Raising Graphs From Randomness to Reveal Information Networks.
Datasets can be found here.
- All files have three columns: 1 unix timestamp, 2 user id, 3 user id.
- If the value in the 3rd column is "-1", then instead of an edge a root adopter was observed.
- Each undirected edge occurs once in the file, when it appeared first in the time series.
- Files are indexed by the same codes used in the paper.
The following modules are required to run the codes written in Python:
- Numpy
- Scipy
- Matplotlib
- Pandas
- Seaborn
- Networkx
These scripts generate all the statistics that we investigate in Section 4. Jupyter Notebooks introduced below will use the outputs of these measurements.
- To run all measurements, run the
sh/experiment_all.sh
- For
$DATA_FOLDER
please set the folder where you downloaded the network files - For
$STATS_FOLDER
please set an output folder where each measurement will be generated
- For
- A short explanation of the executed scripts:
experiment_random_shuffle.sh
creates randomly shuffled time series that we compare to the original network timelinesexperiment_degree_distribution_stats.sh
computes the degree distribution at different sizes for each networkexperiment_network_events.sh
computes the fraction of R,I,H events as the networks growexperiment_exponent_stats.sh
computes the degree distribution parameter estimates as the networks grow
The following notebooks cover our measurements explained in Section 4 of our paper. Please modify the input folder that should be the output of the previously detailed scripts in each Jupyter notebook.
- Average degree
- Evolving power-law degree distributions
- Average degree and the exponent of the power-law degree distribution
- Microscopic view
- No Fit to Uniform Edge Sampling
The C++ code can be found here. To build the program, run the scons
command inside the /cpp/src/ folder.
An example script for running the model is here.