Degree centrality for weighted networks

1,420 views
Skip to first unread message

Justin

unread,
Apr 23, 2009, 12:40:39 PM4/23/09
to networkx-discuss
Both betweenness_centrality and load_centrality accept the keyword
weighted_edges, but degree_centrality does not. It could easily be
extended to do so by defining the degree of a node to be the sum of
the weights of the edges it has. For DiGraphs, we would take the
outgoing edges only. Newman mentions this in "Analysis of weighted
networks" http://arxiv.org/pdf/cond-mat/0407503v1.

Dan Schult

unread,
Apr 23, 2009, 4:16:01 PM4/23/09
to networkx...@googlegroups.com
This would be easy to implement because our degree_iter method
already has a "weighted" optional argument. Newman doesn't seem to
directly discuss degree centrality--so how should this be
normalized? Still divide by N-1? divide by sum(weights)? sum
(weights)-1?
We could also not normalize at all.. and of course we could add
another keyword to control normalization.
What do people think?
Dan

Aric Hagberg

unread,
Apr 23, 2009, 5:40:48 PM4/23/09
to networkx...@googlegroups.com
On Thu, Apr 23, 2009 at 2:16 PM, Dan Schult <dsc...@colgate.edu> wrote:
>
> This would be easy to implement because our degree_iter method
> already has a "weighted" optional argument.  Newman doesn't seem to
> directly discuss degree centrality--so how should this be
> normalized?  Still divide by N-1? divide by sum(weights)?  sum
> (weights)-1?
> We could also not normalize at all.. and of course we could add
> another keyword to control normalization.
> What do people think?

Good idea. We could also add (or figure out how to fold in)
in-degree and out-degree centrality for directed graphs.
See my earlier message with code
http://groups.google.com/group/networkx-discuss/browse_thread/thread/ca07750026655dc4

Aric

Justin

unread,
Apr 24, 2009, 11:05:32 AM4/24/09
to networkx-discuss
I was thinking about how to normalize after I posted, and I think
dividing by sum(weights) is the way to go. That way, the star graph
is still the only graph which will have a node with degree 1.

Justin
Reply all
Reply to author
Forward
0 new messages