igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] average local transitivity


From: Szabolcs Horvát
Subject: Re: [igraph] average local transitivity
Date: Sat, 27 Oct 2018 10:39:51 +0200

Actually, I believe that this is a bug.  I reported it a while ago (but I could not recall this immediately).

https://github.com/igraph/igraph/issues/907

I do not consider it a bug in the C interface function, as when programming in C, it is typically the user who is expected to supply valid input (and it is not the function that is expected to check validity).

But in R it is definitely a bug. A high-level interface should just not accept invalid input.

On Sat, 27 Oct 2018 at 10:33, Szabolcs Horvát <address@hidden> wrote:
This happens because this is not a simple graph. It has multi-edges.  The "average" computation ignores these, the "local" computation does not. I did not verify if the "local" computation gives reasonable results for multigraphs, though.

On Sat, 27 Oct 2018 at 09:57, Raigo Aljand <address@hidden> wrote:
I added to the attachment the graph that gives me these results. It is
saved in edgelist format.

27.10.18 10:42 Gábor Csárdi kirjutas:
> Please provide a reproducible example.
>
> Gabor
> On Sat, Oct 27, 2018 at 7:13 AM Raigo Aljand <address@hidden> wrote:
>> Hello,
>>
>> I have a simple question. I looked at the archives, but it doesn't seem
>> anyone has asked this nor does it seem to be written in the documentation.
>>
>> Why do these two give me different results?
>>
>> transitivity(graph, type = "average")
>> 0.3772343
>> mean(transitivity(graph, type = "local"), na.rm = TRUE))
>> 0.2014909
>>
>> I understand the difference between global and local transitivity and
>> what I read from the internet type="average" should give me the average
>> local transitivity. Then why does the igraph average give me a different
>> result from when I calculate the average with R. What is also strange is
>> that type="average" is either no longer or has never been documented in
>> the official documentation.
>>
>> If it helps, my graph is directed, but as I understand it, igraph
>> ignores the direction of the edges.
>>
>> My version of igraph is Ubuntu 18.04 package r-cran-igraph with version
>> 1.1.2 and R is from the package r-base with version 3.4.4
>>
>> Thank you for your help.
>>
>>
>>
>> _______________________________________________
>> igraph-help mailing list
>> address@hidden
>> https://lists.nongnu.org/mailman/listinfo/igraph-help
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help

reply via email to

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