Re: [igraph] average local transitivity

2018-10-27 Thread Raigo Aljand
Thank you for your help. I solved the problem by scrubbing the graph 
first with


simplify(as.undirected(graph))


27.10.18 11:39 Szabolcs Horvát kirjutas:
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 > 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 mailto:ralj...@gmail.com>> 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
mailto:ralj...@gmail.com>> 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
>> igraph-help@nongnu.org 
>> https://lists.nongnu.org/mailman/listinfo/igraph-help
> ___
> igraph-help mailing list
> igraph-help@nongnu.org 
> https://lists.nongnu.org/mailman/listinfo/igraph-help
___
igraph-help mailing list
igraph-help@nongnu.org 
https://lists.nongnu.org/mailman/listinfo/igraph-help


___
igraph-help mailing list
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help
___
igraph-help mailing list
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help


Re: [igraph] average local transitivity

2018-10-27 Thread Szabolcs Horvát
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  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  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  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
>> >> igraph-help@nongnu.org
>> >> https://lists.nongnu.org/mailman/listinfo/igraph-help
>> > ___
>> > igraph-help mailing list
>> > igraph-help@nongnu.org
>> > https://lists.nongnu.org/mailman/listinfo/igraph-help
>> ___
>> igraph-help mailing list
>> igraph-help@nongnu.org
>> https://lists.nongnu.org/mailman/listinfo/igraph-help
>>
>
___
igraph-help mailing list
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help


Re: [igraph] average local transitivity

2018-10-27 Thread Szabolcs Horvát
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  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  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
> >> igraph-help@nongnu.org
> >> https://lists.nongnu.org/mailman/listinfo/igraph-help
> > ___
> > igraph-help mailing list
> > igraph-help@nongnu.org
> > https://lists.nongnu.org/mailman/listinfo/igraph-help
> ___
> igraph-help mailing list
> igraph-help@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
___
igraph-help mailing list
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help


Re: [igraph] average local transitivity

2018-10-27 Thread Gábor Csárdi
Please see this:
https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example

G.
On Sat, Oct 27, 2018 at 8:57 AM Raigo Aljand  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  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
> >> igraph-help@nongnu.org
> >> https://lists.nongnu.org/mailman/listinfo/igraph-help
> > ___
> > igraph-help mailing list
> > igraph-help@nongnu.org
> > https://lists.nongnu.org/mailman/listinfo/igraph-help
> ___
> igraph-help mailing list
> igraph-help@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/igraph-help

___
igraph-help mailing list
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help


Re: [igraph] average local transitivity

2018-10-27 Thread Raigo Aljand
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  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
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help

___
igraph-help mailing list
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help
0 992
0 1058
0 1256
1 0
1 0
1 3
1 4
1 7
1 353
2 5
3 1
3 7
4 1
5 2
5 411
6 4
6 922
6 1108
7 1
7 3
8 18
9 10
9 11
9 12
9 12
9 13
9 14
9 15
9 16
9 17
10 9
10 9
10 44
10 50
10 59
10 62
10 65
10 84
10 86
10 91
10 96
10 118
10 383
10 384
10 412
10 469
10 473
11 44
11 50
11 65
11 86
11 91
11 96
11 98
12 9
12 45
12 59
12 62
12 84
12 87
12 97
12 100
12 118
12 469
12 473
12 937
12 1136
12 1314
12 1343
12 1365
12 1412
13 9
13 9
13 379
13 386
14 9
14 379
15 9
16 9
16 353
17 9
17 9
17 360
17 404
17 705
17 705
17 706
17 706
18 8
18 9
18 17
18 54
18 57
18 252
18 253
18 254
18 255
18 416
18 854
18 856
18 858
18 997
18 1026
18 1142
18 1148
18 1184
18 1346
19 9
19 20
19 21
19 22
19 23
19 24
19 712
19 1212
20 40
20 1415
21 20
21 20
21 20
21 20
21 20
21 40
21 1415
22 20
22 20
22 20
22 20
22 20
22 40
22 1415
23 1415
24 23
24 1415
25 24
25 24
25 34
25 34
26 9
26 28
26 28
26 28
26 28
26 29
26 29
26 29
26 29
26 30
26 30
26 31
26 31
26 32
26 32
26 34
26 35
26 37
27 28
27 29
28 21
28 22
28 40
28 1415
29 21
29 22
29 40
29 1415
30 28
30 28
30 28
30 28
30 28
30 29
30 29
30 29
30 29
30 29
30 37
30 37
30 1415
31 28
31 28
31 28
31 28
31 28
31 29
31 29
31 29
31 29
31 29
31 37
31 37
31 1415
32 28
32 29
32 31
32 31
33 30
33 30
33 31
33 31
33 32
33 32
34 28
34 28
34 29
34 29
34 30
34 31
34 32
34 36
34 1415
35 28
35 29
35 30
35 31
35 32
35 36
36 9
36 34
36 34
36 35
36 35
36 359
37 28
37 28
37 28
37 28
37 28
37 29
37 29
37 29
37 29
37 29
37 30
37 31
37 32
38 28
38 28
38 29
38 29
38 30
38 31
39 20
39 20
39 21
39 21
39 22
39 22
39 23
39 23
39 28
39 28
39 28
39 28
39 29
39 29
39 29
39 1394
39 1394
40 362
40 383
40 384
40 704
41 44
41 45
41 46
41 47
41 48
41 49
41 50
41 51
41 52
41 56
41 57
41 58
41 59
41 60
41 61
41 62
41 63
41 64
41 65
41 66
41 67
41 68
41 69
41 997
41 1041
41 1089
41 1094
41 1107
41 1125
41 1134
41 1138
41 1181
41 1211
41 1239
41 1314
41 1365
41 1412
42 49
43 46
43 47
43 48
43 49
44 9
44 45
44 46
44 47
44 48
44 49
44 52
44 55
44 56
44 57
44 1041
44 1089
44 1094
44 1211
44 1236
44 1314
45 11
45 12
45 96
46 47
46 48
46 49
47 46
47 49
48 46
48 47
49 46
49 47
49 48
50 9
50 51
50 52
50 55
50 56
50 57
50 1041
50 1094
50 1125
50 1211
50 1236
50 1314
51 11
51 12
51 50
52 55
53 54
53 55
53 72
54 53
55 52
55 52
55 53
55 53
56 1041
56 1094
57 56
57 56
57 1041
57 1094
57 1211
57 1211
58 664
58 937
59 9
59 60
59 60
59 61
59 1107
59 1138
59 1239
60 12
61 328
61 328
61 332
61 341
62 9
62 63
62 63
62 64
62 1134
62 1134
62 1181
62 1365
63 12
64 328
64 328
64 332
64 341
65 9
65 9
65 66
65 66
65 67
65 67
65 68
65 69
65 1305
66 65
67 65
68 65
69 425
70 72
70 72
70 73
70 73
70 73
70 74
70 74
70 74
70 75
70 75
70 75
70 76
70 76
70 77
70 77
70 78
70 78
70 79
70 80
70 81
70 81
70 82
70 82
70 82
70 659
70 660
70 661
70 662
70 663
70 664
70 665
70 666
70 667
70 668
70 669
70 670
70 671
70 672
70 673
70 674
70 675
70 676
70 677
70 937
70 1026
70 1307
70 1307
70 1328
70 1328
70 1380
70 1399
71 44
71 45
71 46
71 47
71 48
71 49
71 50
71 51
71 1089
71 1125
72 1328
73 74
73 660
74 73
74 73
74 81
74 82
75 76
75 78
75 660
76 75
76 75
76 81
76 82
77 75
78 79
78 660
79 78
79 78
79 78
79 81
79 82
80 75
80 77
80 78
80 78
80 78
80 1089
80 1125
81 73
81 73
81 75
81 75
81 78
81 78
82 73
82 75
82 78
83 84
83 85
83 86
83 87
83 88
83 89
83 90
83 91
83 92
83 93
83 94
83 95
84 9
84 85
84 86
85 12
86 9
86 87
86 88
86 89
86 90
86 94
86 95
87 11
87 12
87 84
88 86
88 87
89 86
89 88
90 84
90 84
91 9
91 9
91 66
91 67
91 68
91 69
91 1305
92 44
92 45
92 45
92 46
92 46
92 47
92 47
92 48
92 48
92 49
92 4

Re: [igraph] average local transitivity

2018-10-27 Thread Gábor Csárdi
Please provide a reproducible example.

Gabor
On Sat, Oct 27, 2018 at 7:13 AM Raigo Aljand  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
> igraph-help@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/igraph-help

___
igraph-help mailing list
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help


[igraph] average local transitivity

2018-10-26 Thread Raigo Aljand

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
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help