igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Centrality measure in igraph


From: Gábor Csárdi
Subject: Re: [igraph] Centrality measure in igraph
Date: Mon, 21 Jul 2014 18:06:37 -0400

Hmmm, it seems that there is a bug in alpha.centrality, if sparse=TRUE
and the graph is undirected.

You need to use sparse=FALSE, or, if your graph is big, then convert
it to directed:

library(igraph)
g <- graph.ring(10)
alpha.centrality(g, sparse=FALSE)
#  [1] -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
alpha.centrality(g, sparse=TRUE)
#  [1]  1  2  3  4  5  6  7  8  9 11
g2 <- as.directed(g, mode="mutual")
alpha.centrality(g2, sparse=TRUE)
#  [1] -1 -1 -1 -1 -1 -1 -1 -1 -1 -1



On Mon, Jul 21, 2014 at 6:20 AM, Mathieu Ferry <address@hidden> wrote:
> Dear all,
>
> I am trying to apply some centrality measures to a network.
>
> I find that one node has a degree of 11, which is relatively high,
>
> but when I compute alpha centrality (alpha = 0.5 , exo= 0.5), I find a
> measure that is lower than this (1.875).
>
> I don't understand how this can be possible, whether it is theoretically
> possible actually...
>
> I mean, how can my alpha centrality measure be lower than 11*0.5 = 5.5?
> Shouldn't it be 11*0.5 + ... all other paths?
>
> The network is undirected, g is an adjacency matrix, with 250 nodes.
>
> This is the command I used:
> katz0.5 <- alpha.centrality(g, nodes=V(g), alpha=0.5, loops=FALSE,
>                             exo=0.5, weights=NA,tol=1e-7, sparse=TRUE)
>
> Thanks for your help !
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>



reply via email to

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