Skip to content

GSoC 2024: Betweenness Centrality: Week 6 #392

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 8, 2024

Conversation

bedupako12mas
Copy link
Contributor

@bedupako12mas bedupako12mas commented Jul 2, 2024

Changes to be done in this pull request:

  • change betweenness_centrality to centrality
  • change the name of docs from pgr_centrality.rst to pgr_betweennessCentrality.rst
  • Fix the code for directed graphs
  • change betweenesscentrality to betweennessCentrality
  • Finish the docs and pgr_betweennessCentrality to experimental.rst
    • could not fix the display query in this PR but it is the first commit in the next one
  • finish docqueries
    • cleanup test.conf
    • write explicit, and implicit test cases for directed and undirected graphs
    • for all docqueries test provide by-hand calculation

Currently I have been using the BGL provided relative betweenness centrality helper function defined in boost/graph/betweenness_centrality.hpp to calculate it. But in its implementation it does not adjust the normalization factor for directed graphs and uses the same factor as the undirected case giving incorrect results. I have fixed this issue by just dividing the result from the helper function by 2.0 in the case for directed graphs hence accounting for the discrepancy.

Normalization factors for directed and undirected graphs:
github PR rbc upload

Implementation for relative betweenness centrality fucntion:
github PR rbc code photo


Manual calculation for docqueries (pgRouting sample data):
edge id < 2 and edge id < 3

cases id   2,3

edge id < 4 and edge id < 5

cases id   4,5

@bedupako12mas bedupako12mas merged commit 511653c into pgRouting:arun-2024 Jul 8, 2024
17 of 21 checks passed
@bedupako12mas bedupako12mas changed the title Centrality Week 6 Centrality: Week 6 Jul 9, 2024
@bedupako12mas bedupako12mas changed the title Centrality: Week 6 GSoC 2024: Betweenness Centrality: Week 7 Aug 20, 2024
@bedupako12mas bedupako12mas changed the title GSoC 2024: Betweenness Centrality: Week 7 GSoC 2024: Betweenness Centrality: Week 6 Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant