Skip to content

uma-dev/graph-centrality-measures

Repository files navigation

Graph Centrality Measures

Generates synthetic graphs, computes centrality measures, and visualizes the results in informative plots.

Features

✅ Generates synthetic graphs:

  • Erdős–Rényi Erdos-Renyi_centralities_grid

  • Watts–Strogatz Watts-Strogatz_centralities_grid

  • Barabási–Albert Barabasi-Albert_centralities_grid

  • Stochastic Block Model Stochastic-Block_centralities_grid

  • Directed random graph Directed_centralities_grid

✅ Computes multiple centralities:

  • PageRank
  • Degree
  • Closeness
  • (Hubs & Authorities for directed graphs)

✅ Visualizes:

  • Single graph per centrality
  • Summary grid per graph (all centralities in one image)
  • Saves results to /output folder

Project Structure

graph_analysis_project/
├── graphs/ # Graph generators (synthetic)
├── analysis/ # Centrality computation & visualization
├── output/ # Results (.png)
├── main.py # Main runner script
├── requirements.txt # Python dependencies
└── README.md

Installation and usage

Use uv or pip:

uv pip install -r requirements.txt
pip install -r requirements.txt

python main.py # run the main script

Results will be shown in:

/output/*.png

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages