igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] calculating information centrality in igraph


From: Gábor Csárdi
Subject: Re: [igraph] calculating information centrality in igraph
Date: Mon, 9 Mar 2009 22:58:44 +0100

Yep, this is a know bug, it happens if you set 'sparse=TRUE' and the
graph has a 'name' vertex attribute. Remove the 'name' vertex
attribute temporarily and it should work fine.

Whether 'Matrix' will be able to do the computation, that is another
question, but I think it is worth a try.

G.

On Sun, Mar 8, 2009 at 10:02 PM, Ruy Cervantes <address@hidden> wrote:
> Hi Gabor,
>
> Thanks for your reply.
>
> I tried getting the adjacency, but I get an error:
> ---
>> A_g <- get.adjacency(g, sparse=TRUE)
> Error in el[, 1] + 1 : non-numeric argument to binary operator
> ---
> ---
> My graph looks like this:
>> summary(g)
> Vertices: 26987
> Edges: 3440422
> Directed: TRUE
> No graph attributes.
> Vertex attributes: name, id_original, date, year, month.
> No edge attributes.
> ---
>
> Any ideas why I get this error back?
>
> Thanks,
> Ruy
>
> On Sun, Mar 8, 2009 at 12:47 PM, Gábor Csárdi <address@hidden> wrote:
>>
>> Hu Ruy,
>>
>> try using the 'Matrix' package and the 'sparse=TRUE' option of
>> 'get.adjacency'.
>>
>> G.
>>
>> On Sun, Mar 8, 2009 at 8:38 PM, Ruy Cervantes <address@hidden> wrote:
>> > Hi,
>> >
>> > Has anyone calculated the information centrality (Stephenson and Zelen,
>> > 1989)  metric using igraph for a large graph?
>> >
>> > The problem that I face is that information centrality is calculated
>> > inverting a matrix, but my the network that I have is quite large(26,000
>> > nodes and 300,000 edges), and R runs out memory if I get the adjacency
>> > matrix from igraph.
>> >
>> > Information centrality is calculated inverting the matrix B. B = D(r) -
>> > A +
>> > J , where D(r) is a diagonal matrix with the degree of each node, A is
>> > the
>> > adjacency matrix, and J a matrix full of 1's.
>> >
>> > I am using igraph 5.1, R 2.8.1 in OS X.
>> >
>> > Any ideas?
>> >
>> > Thanks,
>> > Ruy Cervantes
>> >
>> > _______________________________________________
>> > igraph-help mailing list
>> > address@hidden
>> > http://lists.nongnu.org/mailman/listinfo/igraph-help
>> >
>> >
>>
>>
>>
>> --
>> Gabor Csardi <address@hidden>     UNIL DGM
>>
>>
>> _______________________________________________
>> igraph-help mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/igraph-help
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>
>



-- 
Gabor Csardi <address@hidden>     UNIL DGM




reply via email to

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