igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Incorrect theoretical max for betweenness calculation on la


From: Gábor Csárdi
Subject: Re: [igraph] Incorrect theoretical max for betweenness calculation on large networks
Date: Thu, 31 Jan 2013 13:38:14 -0500

Hi,

I believe that this is an overflow error in the C core that was fixed (by Tamas, actually :) in the development tree, but it is still there in your version:
http://bazaar.launchpad.net/~igraph/igraph/0.6-main/revision/2897

Thanks for the report!

Best,
Gabor


On Tue, Jan 29, 2013 at 5:09 PM, Tamás Nepusz <address@hidden> wrote:
Hi,

Thanks for the bug report. It seems that the C core of igraph does not have this error so the problem is in the glue code that bridges the gap between the C core and R itself. Gabor will probably fix it soon (if it is not fixed already in the development tree). In the meanwhile, you can work around the bug by knowing that the theoretical maximum of centralization.betweenness is (n-1)*(n-1)*(n-2) if your graph is directed and has n vertices, and (n-1)*(n-1)*(n-2)/2 if it is undirected.

All the best,
Tamas

On 29 Jan 2013, at 19:47, F Witmer <address@hidden> wrote:

> I searched the archives and see some prior discussion regarding a problem with the betweenness calculation, but it looks like those issues were resolved.  When calculating the betweenness centralization, the theoretical max value appears to be incorrect causing nonsensical (negative) results.  Here's some R code and the results I get to reproduce it:
>
> > library("igraph")
> > g <- barabasi.game(5000)
> > centralization.betweenness(g)$theoretical_max
> [1] 345973414
> > centralization.betweenness(g)$centralization
> [1] 0.07282635
> > g <- barabasi.game(10000)
> > centralization.betweenness(g)$theoretical_max
> [1] -1127329970
> > centralization.betweenness(g)$centralization
> [1] -0.02273176
>
> And here's my session info:
>
> > sessionInfo()
> R version 2.15.2 (2012-10-26)
> Platform: x86_64-w64-mingw32/x64 (64-bit)
>
> locale:
> [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252
> [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
> [5] LC_TIME=English_United States.1252
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] igraph_0.6-3
>
> loaded via a namespace (and not attached):
> [1] tools_2.15.2
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help


_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help



--
Gabor Csardi <address@hidden>     MTA KFKI RMKI

reply via email to

[Prev in Thread] Current Thread [Next in Thread]