igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] community_fastgreedy() requires integers as edge weights?


From: Kurt J
Subject: Re: [igraph] community_fastgreedy() requires integers as edge weights?
Date: Sun, 27 Apr 2008 16:04:03 +0100

Hi igraphers,

Recall the issue w/ the python interface and the fast_greedy community algorithm only accepting integer weights?  Turns out I was running the wrong scripts and >>G.community_fastgreedy('weight') was never working for me :/

i've grabbed the dev version and re-installed python interface using this:

$ tla get address@hidden/igraph--main--0.5 igraph_dev
...
$ python igraph_dev/interfaces/python setup.py install

Seems ok and then when I try using weights w/ fast_greedy i get a different error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "graphmeasures.py", line 233, in getCom
    vcG = G.community_fastgreedy('audio')
  File "build/bdist.macosx-10.3-fat/egg/igraph/__init__.py", line 437, in community_fastgreedy
igraph.core.InternalError: Error at src/igraphmodule.c:1047: Internal error, Invalid value

Do i need to re-compile the development version of the C core?  If so I'm a bit confused - where are the configure and make scripts?

-Kurt J



On Wed, Apr 9, 2008 at 3:05 PM, Kurt J <address@hidden> wrote:
I think the bug appears only if you supply an attribute name to g.community_fastgreedy() (e.g. g.community_fastgreedy("weight
")). Try to supply the weight vector instead, I reckon this will serve as a workaround till 0.5.1.
actually this is what i did - gave a vector - and it still gave the error.  thanks tho, the patch seems to have sorted out the problem :D

On Wed, Apr 9, 2008 at 2:45 PM, Tamas Nepusz <address@hidden> wrote:
Using the fastgreedy community detection with edge weights i get the following error:
Yes, you're right, that's a bug. It has been fixed in the following patch:
http://cneurocvs.rmki.kfki.hu/cgi-bin/archzoom.cgi/address@hidden/igraph--main--0.6--patch-42/interfaces/python/src/igraphmodule.c.diff?diff
There are many patches waiting to be backported to the 0.5 tree before the upcoming release of igraph 0.5.1 (which will fix this bug and some others as well).

I think the bug appears only if you supply an attribute name to g.community_fastgreedy() (e.g. g.community_fastgreedy("weight")). Try to supply the weight vector instead, I reckon this will serve as a workaround till 0.5.1.

--
Tamas



Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "graphmeasures.py", line 226, in getCom
   vcG = G.community_leading_eigenvector()
 File "build/bdist.macosx-10.3-fat/egg/igraph/__init__.py", line 437, in community_fastgreedy
TypeError: sequence elements must be integers

If i understand the algorithm, it should be quite happy with floats.  Am I wrong? Is this a bug?

-Kurt J
_______________________________________________
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



reply via email to

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