igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Bonpower Crashes (Sparse matrix Help)


From: Gábor Csárdi
Subject: Re: [igraph] Bonpower Crashes (Sparse matrix Help)
Date: Mon, 13 Apr 2009 21:06:00 +0200

Hello Nathan,

On Mon, Apr 13, 2009 at 7:31 PM, Surendar Swaminathan
<address@hidden> wrote:
> Hello Gabor,
>
>      I did some work on the bonpow working on different graph. Please bear
> with me.Bonpow and the sparse matrix is working for this graph object but
> only if I know the exponential value.

hmm, this is just a parameter AFAIK, so there is nothing to 'know' here.

> For example. I am attaching a file along with this email.
> The file 'Graph1.RData' (306 KB) is available for download a
> http://dropbox.unl.edu/uploads/20090420/586866ae80b390cf/Graph1.RData
> When I run bonpow(g) it throws an error
>
> Error in solve.default(id - exponent * d, tol = tol) :
> system is computationally singular: reciprocal condition number =
> 1.15648e-18
> Then what I did is substituted the value in the option
>
> bonpow(g,exp=1.15648e-18)

Hmmm, but why? I can't see any relationship between 'reciprocal
condition number' and 'exponent', but I have to admit that I hardly
know what the former is.

Anyway, this exponent is basically zero, that means that the power of
the neighbors has no or very little effect on the power of the vertex
itself. In other words, you are basically calculating (out-)degree in
a fancy way. E.g.

g <- erdos.renyi.game(100, 400, type="gnm", directed=TRUE)
cor(bonpow(g, exponent=0), degree(g, mode="out"))
[1] 1

> Bonpow is working and I got very convincing results. With respect to the
> sparse matrix.I substitute the same value for the exp in solve the sparse
> matrix is working fine without , but I have not validated the results yet.
>
> Example 2.
>
> The file 'Graph12.RData' (272 KB) is available for download at
> <http://dropbox.unl.edu/uploads/20090420/b3293976d05cebb1/Graph12.RData>
>  With respect to this graph when I use bonpow(g) it works fine and did not
> throw me an error.I think it is calculating with the exp=1 by default I
> validated the result and it is not convincing.Nodes at the periphery has the
> highest bonpow (nodes which has just one connect to the giant
> component).This graph worked on the sparse matrix with out any error and I
> have not validated the results yet.
>
> Can you tell why it is happening only with respect to this graph. I really
> dont understand can I think the sparse matrix is working properly.I am
> guessing everything depends on the reciprocal value.Is there anyway to find
> the reciprocal value for each graph.

Well, I can just repeat myself. I think 'solve' in 'Matrix' is broken.

Gabor

> Nathan
>
> On Wed, Apr 8, 2009 at 9:11 AM, Surendar Swaminathan
> <address@hidden> wrote:
>>
>> Hello Gabor,
>>
>>   Thank you very much for the input.R was crashed and I am not able to
>> reproduce them.A window pop up asking me to terminate the program and there
>> is only two option close or send error report I guess it must be that R
>> Crashed.
>>
>> Otherwise I get the error with the two graphs I sent.I will post to the R
>> help
>>
>>
>> Thank you very much.
>> Nathan
>>
>> On Wed, Apr 8, 2009 at 2:27 AM, Gábor Csárdi <address@hidden> wrote:
>>>
>>> Hello Nathan,
>>>
>>> On Wed, Apr 8, 2009 at 1:07 AM, Surendar Swaminathan
>>> <address@hidden> wrote:
>>> [...]
>>> > Error
>>> >
>>> > Error in solve(id - exponent * d, tol = tol) :
>>> >   INTEGER() can only be applied to a 'integer', not a 'NULL'
>>>
>>> This is not a crash, it is an error message. Maybe it does not matter
>>> for you, but it does matter if one wants to find the bug. It seems to
>>> be a problem in the Matrix package, for me it fails in various ways.
>>> E.g. if I simplify() the first graph and keep only the giant component
>>> of it, then I get:
>>>
>>> Error in solve(id - exponent * d, tol = tol) :
>>>  cs_lu(A) failed: near-singular A (or out of memory)
>>>
>>> which is fine, it just says that the equation cannot be solved. But
>>> for some graphs I also get
>>>
>>> > bp <- bonpow.sparse(g2, exponent=0.9)
>>> Error in solve(id - exponent * d, tol = tol) :
>>>  INTEGER() can only be applied to a 'integer', not a 'builtin'
>>>
>>> and sometimes it really crashes:
>>>
>>> > bp <- bonpow.sparse(g2, exponent=0.9)
>>> *** glibc detected *** corrupted double-linked list: 0x0000000003188ae0
>>> ***
>>>
>>> This is on Linux and R 2.8.1.
>>>
>>> Anyway, this is an issue with 'solve' from the 'Matrix' package. Try
>>> to post to R-help, send the bonpow.sparse code and the links to your
>>> graphs. Your subject line should be something like "Matrix package,
>>> solve() errors and crashes". Make sure you also send the output of the
>>> sessionInfo() command.
>>>
>>> Best,
>>> G.
>>>
>>> [...]
>>> > Error
>>> > Error: cannot allocate vector of size 3.3 Gb
>>> > In addition: Warning messages:
>>> > 1: In solve(id - exponent * d, tol = tol) :
>>> >   Reached total allocation of 1535Mb: see help(memory.size)
>>> > 2: In solve(id - exponent * d, tol = tol) :
>>> >   Reached total allocation of 1535Mb: see help(memory.size)
>>> > 3: In solve(id - exponent * d, tol = tol) :
>>> >   Reached total allocation of 1535Mb: see help(memory.size)
>>> > 4: In solve(id - exponent * d, tol = tol) :
>>> >   Reached total allocation of 1535Mb: see help(memory.size)
>>>
>>> This is a memory issue. Maybe see ?Memory, but I don't it would ever
>>> work on 32bit Windows XP.
>>>
>>> [...]
>>>
>>> --
>>> Gabor Csardi <address@hidden>     UNIL DGM
>>>
>>>
>>> _______________________________________________
>>> 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
>
>



-- 
Gabor Csardi <address@hidden>     UNIL DGM




reply via email to

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