igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Leading Eigenvector Community


From: Gábor Csárdi
Subject: Re: [igraph] Leading Eigenvector Community
Date: Fri, 16 Jan 2009 17:00:40 +0100

[I am sending this to the igraph-help mailing list as well, it might
be useful for other people, plus to keep it in the mailing list
archive.]

OK, there are a number issues here. First, the 'edgelist' reader
creates a directed graph by default, I assume you want an undirected
one, since the method was developed to undirected graphs:

gr <- read.graph("test.graph","edgelist", directed=FALSE)

Second, your graph has many isolate vertices, maybe you want to do the
community detection for the largest component only:

cl <- clusters(gr)
gr2 <- subgraph(gr, which(which.max(cl$csize)-1 == cl$membership)-1)

Third, the 'options' argument should be a named list, i.e.

led1 <- leading.eigenvector.community(gr2,
                        options=list(maxiter=1000000))

You never actually changed the 'maxiter' parameter. igraph should
check the argument, I will update this in the next version.

Fourth, quite stupidly, igraph sets the 'ncv' parameter to a fixed 3
for this function, and the one you give in the 'options' parameter
does not work. I have updated this in the development version and
uploaded a source R package to
http://cneurocvs.rmki.kfki.hu/igraph/download/igraph_0.6.tar.gz
Please tell me if you need a windows binary package instead.

After this, I can run the function without warnings (on either gr or
gr2), and the results seem to be consistent:

led1 <- leading.eigenvector.community(gr2,
                                      options=list(maxiter=1000000, ncv=5))

Maybe you need a higher 'ncv' value for gr.

Best, Gabor

On Fri, Jan 16, 2009 at 3:46 PM, Mohammad AlMarzouq
<address@hidden> wrote:
> Gabor,
>
> I'm using R v 2.8, igraph v0.5.1 installed from CRAN repo.
>
> Attached is the graph in edgelist format.
> The following would reproduce the problem:
>
> gr = read.graph("test.graph","edgelist")
> leading.eigenvector.community(gr)
>
> generates 40+ warnings
>
> increasing maxiter to 1M would generate anywhere from 2 to 20 warnings
> leading.eigenvector.community(gr,options=c("maxiter=1000000"))
>
> The results are close, but not reproducible.
>
> Best Regards,
>
> Mohammad
>
>
>
>
>
>
>
> On Jan 16, 2009, at 5:48 AM, Gábor Csárdi wrote:
>
>> Mohammad,
>>
>> what igraph version are you using? Could you send me your graph, just
>> to reproduce the phenomenon.
>>
>> Thanks,
>> G.
>>
>> On Wed, Jan 14, 2009 at 7:48 PM, Mohammad AlMarzouq
>> <address@hidden> wrote:
>>>
>>> Gabor,
>>>
>>> I keep getting these warnings when using leading.eigenvector.community
>>> for
>>> 1K nodes, 5K edge graph:
>>>
>>> Warning messages:
>>>
>>> 1: In leading.eigenvector.community(g, options = list(maxiter = 1e+06)) :
>>> At community.c:1168 :Maximum number of ARPACK iterations reached
>>>
>>> 2: In leading.eigenvector.community(g, options = list(maxiter = 1e+06)) :
>>> At community.c:1168 :Maximum number of ARPACK iterations reached
>>>
>>> 3: In leading.eigenvector.community(g, options = list(maxiter = 1e+06)) :
>>> At community.c:1168 :Maximum number of ARPACK iterations reached
>>>
>>> 4: In leading.eigenvector.community(g, options = list(maxiter = 1e+06)) :
>>> At community.c:1168 :Maximum number of ARPACK iterations reached
>>>
>>> 5: In leading.eigenvector.community(g, options = list(maxiter = 1e+06)) :
>>> At community.c:1168 :Maximum number of ARPACK iterations reached
>>>
>>> I used to get 40+ of these warnings but you can see I increased the
>>> maxiter
>>> option to 1M. Should I continue to increase the iterations? Am I supposed
>>> to
>>> get multiple warnings when running the algorethm on a single graph?
>>>
>>> my biggest problem at the moment is that I can not reproduce any results
>>> I
>>> get from these methods. I would appreciate your guidance.
>>>
>>> My deepest appreciation and admiration for all the work you put into
>>> igraph.
>>>
>>> Best regards,
>>>
>>> Mohammad AlMarzouq
>>> PhD Candidate - IS Track
>>> Department of Management
>>> Clemson University
>>>
>>
>>
>>
>> --
>> Gabor Csardi <address@hidden>     UNIL DGM
>
>
>



-- 
Gabor Csardi <address@hidden>     UNIL DGM




reply via email to

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