thomasp85 / tidygraph

A tidy API for graph manipulation
https://tidygraph.data-imaginist.com
Other
546 stars 61 forks source link

betweenness_centrality() does not return normalized values #176

Closed blaschke closed 11 months ago

blaschke commented 11 months ago

I have come across the issue that calling betweenness_centrality() does not return normalized values. Here is a reproducible example:

create_notable('bull') %>% activate(nodes) %>% mutate( betweenness = centrality_betweenness(normalized = FALSE), betweenness_normalized = centrality_betweenness(normalized = TRUE) )

I already checked the source code and the underlying igraph function, but I cannot make out why it doesn't work. Perhaps you can help?

thomasp85 commented 11 months ago

My guess is this is a bug in igraph since the argument is passed directly into the underlying igraph function. You should see if you can replicate the issue directly in igraph and if so raise a bug there