Skip to content
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

Obtaining negative scores on the EdgeBetweennessCentrality metric #1165

Open
AdrianSeguraOrtiz opened this issue Dec 15, 2023 · 0 comments
Open

Comments

@AdrianSeguraOrtiz
Copy link

 * JGraphT version: 1.5.1
 * Java version (java -version)/platform:  11

Issue
I am getting negative values in the EdgeBetweennessCentrality metric for some of my graphs. I don't know if this is really an implementation error or if a negative value is possible for this metric. In case it is not a bug, what interpretation should I give to it?

Steps to reproduce (small coding example)
graph.txt

// Load graph as SimpleDirectedWeightedGraph<Integer, DefaultWeightedEdge>
EdgeBetweennessCentrality<Integer, DefaultWeightedEdge> evaluator = new EdgeBetweennessCentrality<>(graph);
double[] scores = evaluator.getScores().values().stream().mapToDouble(Double::doubleValue).toArray();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant