[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## [igraph] Help with using igraph_centralization_betweenness

**From**: |
Giuseppe G. |

**Subject**: |
[igraph] Help with using igraph_centralization_betweenness |

**Date**: |
Sun, 08 Jul 2012 17:05:22 +0100 |

**User-agent**: |
Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 |

Hi,

`I have an undirected network of 3693 nodes and 9689 edges. The network
``has no self-edges and no multiple edges between any two nodes, and is
``connected.
`

`I'm trying to obtain some global network statistics using the C igraph
``library. So far I have obtained the network diameter, the average path
``length, the global transitivity and the average of the local transitivities.
`

`I would like a global measure summarising the node betweenness
``centrality for the network. I found this new method,
``igraph_centralization_betweenness, which sounds like what I need.
``However I'd like to be sure I'm using it correctly, because I'm getting
``surprising values. This is how I'm using the function
`
//etc..
FILE *instream;
igraph_t graph;
igraph_real_t centr_betw;
igraph_read_graph_edgelist(&graph, instream, 0, IGRAPH_UNDIRECTED);
igraph_centralization_betweenness(&graph,0, 0, 0,¢r_betw,&t_max,0);
printf("Betweenness Centralization %f, max %f\n", centr_betw, t_max);
which gives
Betweenness Centralization 4555078098.244157, max -980219902.000000
If I normalise the centralisation value, I'll get -4.646996

`However I'm not sure these results are correct. The docs says the
``normalised betw.centralisation is a value between 0 and 1. Also, I have
``problems with the other two centralisation functions, eg doing
`
igraph_centralization_closeness(&graph,0, 0,¢r_clos,0,0);
yields
Error at centrality.c:2563 :calculating closeness, Invalid mode
and
igraph_centralization_degree(&graph,0, 0, 1,¢r_degree,0,0);
yields
Error at type_indexededgelist.c:941 :degree calculation failed, Invalid mode
What am I doing wrong? Thanks!
Giuseppe
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

**[igraph] Help with using igraph_centralization_betweenness**,
*Giuseppe G.* **<=**