This repository contains the implementation of essential formulas and figures from the paper "Parameterizing network graph heterogeneity using a modified Weibull distribution." The code is organized into two Jupyter Notebook files, each focusing on different aspects of the research. Additionally, the repository includes the original paper for reference.
-
Parameterizing network graph.ipynb
- Implements most of the key formulas and generates the significant figures presented in the paper.
- Includes custom implementations such as calculating the Gini index, generating and refining scale-free graphs, and comparing degree distributions.
-
Graph Configuration.ipynb
- Implements an alternative method for graph configuration that achieves similar results to the paper's proposed method.
- While not identical to the approach described in the paper, the model is robust and aligns well with the intended outcomes.
-
Paper
- The original paper is included for reference, providing the theoretical background and context for the implemented methods.
A method to compute the Gini index of a graph's degree distribution, offering insights into network heterogeneity.
- Barabási-Albert Graphs: Utilized as the base structure for scale-free networks.
- Degree Distribution Refinement: Ensures that the generated graph matches a target degree distribution using statistical methods like the Kolmogorov-Smirnov (KS) test.
Visualizes and compares the degree distributions of the generated graph and the target sequence using log-log scale histograms.
Visualizes the refined scale-free graph using a spring layout to represent the network structure.
- Graph Visualization:
- Displays the structure of the refined scale-free network.
- Degree Distribution Plots:
- Compares the original degree sequence with the graph's degree distribution.
- Gini Index and KS Test Results:
- Quantifies network heterogeneity and evaluates the similarity between degree distributions.
- Python 3.8+
- Required Libraries:
numpynetworkxmatplotlibscipy
If you're using a virtual environment (e.g., venv) with Jupyter Notebook, ensure the necessary libraries are installed within the environment. Activate your venv and install the required libraries using:
pip install numpy networkx matplotlib scipy-
Clone the repository:
git clone https://github.com/hghaemi/Parameterizing-Network-Graph-Paper.git cd Parameterizing-Network-Graph-Paper -
Open the desired Jupyter Notebook:
jupyter notebook Parameterizing network graph.ipynb
-
Execute the cells to reproduce the figures and results from the paper.
- The method implemented in
Graph Configuration.ipynbdiffers slightly from the paper's proposed configuration model but serves as a robust alternative. - Ensure that all dependencies are installed before running the notebooks.
Contributions are welcome! If you find any issues or have suggestions for improvement, feel free to open an issue or submit a pull request.
If you have any questions, feel free to email me at [h.ghaemi.2003@gmail.com] or open a discussion thread in the repository. I'm happy to help clarify any aspects of the code or methodology.
This project is licensed under the MIT License. See the LICENSE file for details.