igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] transitivity of global type


From: Gábor Csárdi
Subject: Re: [igraph] transitivity of global type
Date: Tue, 25 Aug 2009 08:58:49 +0200

On Tue, Aug 25, 2009 at 6:37 AM, vegetable ball<address@hidden> wrote:
> Thanks. I understand now.
>
> I found another question.
>
> In igraph
> transitivity(g, type="local")
> returns NaN for the vertices with degree = 1.
>
> But, in http://arxiv.org/abs/cond-mat/0303516 ,
> such vertices have C_i = 0

Well, for these vertices the local transitivity is 0/0, which is NaN,
I think. Also, it is better to return NaN, because if you return 0,
then there is no way to distinguish between these and _real_ 0
transitivity (0 divided by k). If don't don't want to distinguish, you
can still replace NaN by zero in the result.

> Is there option that transitivity() returns 0 instead of NaN?

No, there is not, because you can easily do it yourself:

lt <- transitivity(g, type="local")
lt[ is.nan(lt) ] <- 0

Gabor

> On Mon, Aug 24, 2009 at 5:04 PM, Gábor Csárdi <address@hidden> wrote:
>>
>> Hi,
>>
>> On Mon, Aug 24, 2009 at 10:56 AM, vegetable ball<address@hidden>
>> wrote:
>> [...]
>> > In the manual of igraph with R, it is wrote that
>> > "The global transitivity of an undirected graph. This is simply the
>> > ratio of
>> > the triangles and the connected triples in the graph. "
>>
>> Note the word "connected" here. You can also see
>> http://arxiv.org/abs/cond-mat/0303516 for an example.
>>
>> [...]
>>
>> Gabor
>>
>> --
>> 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]