igraph-help
[Top][All Lists]

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

 From: Håvard Wahl Kongsgård Subject: Re: [igraph] ID's for nodes/vertices Date: Mon, 11 Jul 2011 20:53:20 +0200

```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?

-Håvard

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()
> 20000
>>>> print g.ecount()
> 62685
>>>> a = g.similarity_inverse_log_weighted(vertices=33)
>>>> len(a)
> 1
>>>> len(a[0])
> 20000
>
> 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.
>
> --
> T.
>
> _______________________________________________
> igraph-help mailing list