igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Betweenness in weighted adjacency matrix


From: Gábor Csárdi
Subject: Re: [igraph] Betweenness in weighted adjacency matrix
Date: Fri, 3 May 2013 09:45:17 -0400

Marco,

nobody will tell you that it is fine, because there are always details that we don't know, and we cannot (or don't want to) guarantee anything. If you are concerned, you really need to check it for yourself.

An easy way is to use the sna R package, but I am not sure that it supports weights. You said earlier that you got different results with Ucinet, so something might be wrong. Can you send some _complete_ data set that gives different results in igraph and Ucinet?

Gabor


On Fri, May 3, 2013 at 9:38 AM, Marco Antoniazzi <address@hidden> wrote:
Hi,

thank you for your answer, I didn't write the whole matrix in the table just for semplication, but it is a square matrix. So everything should be fine right?

thank you!


2013/5/3 Tamás Nepusz <address@hidden>
Hi,

> Import the txt file which looks as following (The first row specifies the code for the different nodes, the other rows specifies the weights of edges).
How come that your input file is not a square matrix? It seems to have 8 rows and 13 columns -- where are the 5 missing rows and the 5 missing node names?

Otherwise what you do seems okay for me.

> IS it ok for igraph to have the name of the nodes just in the first row and not in the first column to generate an adjacency matrix? i have read somewhere it is the same as having the first column with 'A','B','C',etc
igraph doesn't care -- it does not read your file, it reads the matrix that you loaded with read.table. If the matrix looks fine in R, then it should be okay for igraph as well.

> I want then to calculate the betweenness, that will return a result for each node, but I am not sure whether the weights are inserted correctly in the function.
Seems okay for me, assuming that your input matrix is correct -- which is still a bit weird for me because of the missing rows.

> Is there a way I can check the results using other programs?
Of course -- find another program that can calculate weighted betweenness scores and compare the results ;) One possible option is the NetworkX module for Python if you know the Python language. (igraph also has a Python interface but it would be quite useless to compare igraph in Python vs igraph in R because they use the same implementation).

--
T.
_______________________________________________
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]