igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Re: Example network


From: Tamas Nepusz
Subject: Re: [igraph] Re: Example network
Date: Tue, 4 May 2010 08:21:26 +0100

Mike,

I've got it. This is due to a bug in the NCOL (a.k.a. symbolic edge list) 
reader. When you load a graph from NCOL format in R and the file does not 
contain weights, each edge gets zero weight instead of one. See:

https://bugs.launchpad.net/igraph/+bug/572850

Try this:

> g <- read.graph("your_graph.txt", format="ncol", directed=FALSE)
> E(g)$weight <- 1
> min(evcent(g)$vector)
[1] -3.27822e-19

-- 
Tamas

On 2010.05.03., at 23:31, Tamas Nepusz wrote:

> Mike,
> 
>> Thanks for taking the time to look at the weird eigenvector results that I 
>> get.  Attached is an edgelist (undirected) that produces negative 
>> eigenvector centralities in R.  Let me know if I can answer any other 
>> questions.
> 
> Does your original graph have 817992 vertices or 1520? I get the former if I 
> try to load this graph as a standard edge list, so there are many isolated 
> vertices which do not really change anything but make the calculation 
> somewhat slower.
> 
> Anyway, I tried to load your graph both ways, and I also tried it from Python 
> instead of R. From Python, the minimum eigenvector centrality was -1.1842e-13 
> for the first case and -3.2782e-19 for the second. Both are within the 
> precision limits of the ARPACK solver, it is safe to consider these as zeros. 
> From R, the results were identical for the first case (when the graph had 
> 817992 vertices), but I indeed got the negative eigenvalues for the second 
> case. Modifying ncv, nev or maxiter (as suggested by Gabor) did not seem to 
> help either. This is strange because so far we have only seen this behaviour 
> for pathological graphs, but yours does not seem like that at all.
> 
> Tomorrow I will try to take a closer look at the issue. Since the Python 
> interface gives correct results, I suspect there must be a difference between 
> the default ARPACK parameters used in Python and R, and maybe that will give 
> us a clue about what's going on here.
> 
> -- 
> Tamas
> 
> 
> 
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help





reply via email to

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