igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Selecting vertices for centrality analysis in R


From: Jorge Gil
Subject: Re: [igraph] Selecting vertices for centrality analysis in R
Date: Tue, 18 Dec 2012 12:47:50 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/17.0 Thunderbird/17.0

Hi Gabor,

Thank you again for the help.

I'll use the betweenness workaround that you suggest. Indeed providing the origins doesn't make a difference to the calculation time.


But maybe providing a set of vertices for origin - destination pairs, to calculate only the routes between those, would be very useful. This could cut time dramatically. In the networkX pacakge for python there's a version of betweenness centrality where we can set a random percentage of vertices to use. I did some tests and in my networks using 10% of the routes the result has a .999 R2 to the full calculation. The final values are different, but the ranking of nodes is exactly the same.
Adding the selection of target vertices to the closeness or degree functions would also be useful, allowing to qualify centrality results with regards to specific sub-groups.

Some things to add to my wish list...

Best regards,
Jorge


On 18/12/2012 03:45, Gábor Csárdi wrote:
Hi Jorge,

On Mon, Dec 17, 2012 at 10:22 AM, Jorge Gil <address@hidden> wrote:
[...]
    bet<-betweenness(lg,v=V(lg)[name %in% lo$road_id],directed=F,normalized=T,weights=E(lg)$metric)

This seems to be bug. The workaround is to calculate the betweenness for all vertices and then select the ones you want, manually. (It won't be any slower, betweenness is calculated for all vertices anyway, even if you only request a single vertex.)
 
[...]
As a final point: I would like the weight to be selected dynamically so that I can repeat the analysis in a loop for different weights. How can I refer to the Edge attributes dynamically, using an index for example.

get.edge.attribute(lg, "weight1")
get.edge.attribute(lg, "weight2")
etc.

Thanks for the bug report!

Best,
Gabor
 


Thank you in advance,
Jorge

--
Jorge Gil
PhD Candidate

TU Delft / Faculty of Architecture
Department of Urbanism
Chair of Spatial Planning and Strategy

Julianalaan 134
2628 BL Delft
P.O. Box 5043
2600 GA Delft
The Netherlands

www.tudelft.nl


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




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


-- 
Jorge Gil
PhD Candidate

TU Delft / Faculty of Architecture
Department of Urbanism
Chair of Spatial Planning and Strategy

Julianalaan 134
2628 BL Delft
P.O. Box 5043
2600 GA Delft
The Netherlands

www.tudelft.nl

reply via email to

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