[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] python betweenness and closeness normalization
From: |
Tamás Nepusz |
Subject: |
Re: [igraph] python betweenness and closeness normalization |
Date: |
Fri, 13 Dec 2013 22:52:02 +0100 |
> I took your advice and checked by trying something (e.g. a star graph) in
> both R and Python. The defaults are different for each version of igraph. It
> appears that in python the closeness has default normalized=TRUE , while
> betweenness has default normalized=FALSE. In R, the defaults are both
> normalized=FALSE.
Ah, this is sort of because of “historical reasons”. The R interface has had
the ability to normalize scores for a long time (as far as I know), but the
normalization was implemented in R code, so the Python interface could not have
used it. Some time around 0.6 (can’t remember), the normalization for the
closeness centrality was moved down to the C layer. At that point, I added a
“normalized” argument to Graph.closeness with a default value of True (for sake
of compatibility with earlier versions that have also used normalization since
the C core provided normalized values). So, yes, you are right, this is not
logical. However, switching the default value from True to False in Python
could break existing code for others who have relied on this behaviour so I
guess this is here to stay for now :(
T.