[Networkit] Inconsistencies in centrality.DegreeCentrality

Elisabetta Bergamini elisabetta.bergamini at kit.edu
Tue Jun 7 14:57:43 CEST 2016

Hi Max,

Thanks for raising this issue. Here’s what I think:

On Jun 7, 2016, at 11:19, Maximilian Vogel <maximilian.vogel at student.kit.edu> wrote:

> I'd take care of the necessary changes once we settled on the desired behaviour.
> For the first issue I suggest to add a flag called ignoreSelfloops=True to decide whether to normalize with n or n-1. This could also be automatically detected by calling G.hasSelfloops().
I would be in favor a flag ignoreSelfloops that specifies whether we should count self loops in the degree of a node and whether we should normalize to n or n-1 (the two should be coherent). Personally I don’t like the idea of detecting this automatically with G.hasSelfloops(), because the user might want to assume that there can be self loops, even if the particular graph he’s computing degree centrality on doesn’t have any.
> For directed graphs another flag should be added that the user can choose between in- our out-degree. Is it of interest/use to offer also a combined degree centrality?
I agree about the flag for the in- and out- degree, not sure whether a combined version could be useful. 
I think we should have something similar also for closeness: at the moment it is based on distances FROM a node x TO other nodes (and not the other way around), but I think this is also something the user should be able to specify.
For that, we could either use G.transpose() (although this would be less efficient and would require to keep two versions of the graph) or modify the SSSP and make it possible to run it on the transposed graph, which should be more efficient and could be useful also for other applications, although it would make the SSSP class even more complicated than it already is. Any thoughts on that?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ira.uni-karlsruhe.de/pipermail/networkit/attachments/20160607/a8a71b2b/attachment.html>

More information about the NetworKit mailing list