[Top][All Lists]

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

Re: [igraph] ID's for nodes/vertices

From: Tamás Nepusz
Subject: Re: [igraph] ID's for nodes/vertices
Date: Mon, 11 Jul 2011 21:30:35 +0200


similarity_inverse_log_weighted should not be more computationally intensive than any of the other similarity methods. It might have happened that you hit a bug; send me your graph to my email address if possible and I'll try to figure out what's going on.


On Monday, 11 July 2011 at 20:53, Håvard Wahl Kongsgård wrote:

Sorry about that, I did not read the python API.

But with

a = [4444,4000,43,53,53,5,6]

b = i.similarity_inverse_log_weighted(a)

I get

MemoryError: Error at vector.pmt:125: cannot init vector, Out of memory

again no memory usage

with similarity_jaccard(a) and other "missing link methods" there are no errors,

Is there a bug with the .similarity_inverse_log_weighted() function,
or is it just more computer intensive?


On Mon, Jul 11, 2011 at 4:32 PM, Tamas Nepusz <address@hidden> wrote:
Also with the correct code for "similarity inverse log weighted"

a = i.similarity_inverse_log_weighted(vertices=33,23)
This is definitely not correct Python syntax; you have a positional argument
(23) after a keyword argument (vertices=...) - although this has nothing to
do with the MemoryError of course.

I have just generated a random graph with 20000 vertices and it seems to
work with similarity_inverse_log_weighted, so I don't know what's going on here:

g = Graph.GRG(20000, 0.01)
print g.vcount()
print g.ecount()
a = g.similarity_inverse_log_weighted(vertices=33)

So it seems to work. If you still have problems, please send me your graph
so I can take a look at it.

Does this function also convert the graph into a matrix like object?
No, it does not. The result will be a list of lists, however, that's why you
shouldn't simply pass all the vertices to the function (because the
resulting matrix would be too large to keep it in memory for a graph with
20K vertices), but it should work if you pass vertices in small batches.


igraph-help mailing list

igraph-help mailing list

reply via email to

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