statnet / networkDynamic

Dynamic Extensions for Network Objects
10 stars 1 forks source link

Error in Group 1 labels #11

Open zalmquist opened 2 years ago

zalmquist commented 2 years ago

Per a question from Giacomo, ETCH I notice that the group labels have a small error,

The group labels should be (for vertex.names -- NOT the order of the vertices)

group1<-c(1:8,13, 16:19, 22, 28, 37, 39, 40, 46, 47, 51, 54) group2<-c(9, 10, 14, 15, 20, 21, 23:27, 29, 32, 33, 41:45, 49, 52)

It looks like 16:19 in Group 1 was dropped.

Thanks!

Zack

zalmquist commented 2 years ago

It looks like it is in both formats of the data. Not sure what happened.

mbojan commented 2 years ago

Does this apply to the windsurfers data?

zalmquist commented 2 years ago

Yes. Both data sets.

Best,

Zack


Zack W. Almquist Assistant Professor, Department of Sociology Adjunct Assistant Professor, Department of Statistics Senior Data Scientist Fellow, eScience Institute Training Core PI, Center for Studies in Demography and Ecology University of Washington Editor-in-Chief, Journal of Mathematical Sociology Website: http://depts.washington.edu/zalmquist

On Thu, Feb 17, 2022, 2:02 PM Michał Bojanowski @.***> wrote:

Does this apply to the windsurfers data?

— Reply to this email directly, view it on GitHub https://github.com/statnet/networkDynamic/issues/11#issuecomment-1043658084, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4ZAH725TZFPTZRSYRWBCDU3WECTANCNFSM5OMU2KRA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

skyebend commented 2 years ago

Hi Zach, I'm sorry I'm not up to speed on context here, looks like 16:19 is on the list for group 1?

zalmquist commented 2 years ago

Yeah that is correct. 16:19 should be flagged as part of group 1.

Best,

Zack


Zack W. Almquist Assistant Professor, Department of Sociology Adjunct Assistant Professor, Department of Statistics Senior Data Scientist Fellow, eScience Institute Training Core PI, Center for Studies in Demography and Ecology University of Washington Editor-in-Chief, Journal of Mathematical Sociology Website: http://depts.washington.edu/zalmquist

On Thu, Feb 17, 2022, 4:10 PM Skye Bender-deMoll @.***> wrote:

Hi Zach, I'm sorry I'm not up to speed on context here, looks like 16:19 is on the list for group 1?

— Reply to this email directly, view it on GitHub https://github.com/statnet/networkDynamic/issues/11#issuecomment-1043738787, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4ZAHYFPAU67647ZCTGWNTU3WTABANCNFSM5OMU2KRA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

giava90 commented 2 years ago

Hi, I have noticed that the vertex.names match the "order of the vertices":

library(networkDynamic)
data("windsurfers")
a<-c(); for (i in 1:95){if(i!=windsurfers$val[[i]]$vertex.names) {a<-c(a,windsurfers$val[[i]]$vertex.names)}}; a
# NULL

Also that the nodes 16:18 are flagged as in group1, but 19 and many others are missing:

group1<-c(1:8,13, 16:19, 22, 28, 37, 39, 40, 46, 47, 51, 54)
a<-c();for (i in 1:95){if(windsurfers$val[[i]]$group1==1) {a<-c(a,windsurfers$val[[i]]$vertex.names)}};intersect(a, group1)
# [1]  1  2 16 17 18 39 40

Could it be possible that indices and vertex.names have gotten mixed up somewhere? I hope this helps to clarify the problem.

Best, Giacomo

Some code to reproduce the issue:

library(networkDynamic)
data("windsurfers")
a<-c();for (i in 1:95){a<-c(a,windsurfers$val[[i]]$group1)}; sum(a)
# [1] 18   The output should be 22
group1<-c(1:8,13, 16:19, 22, 28, 37, 39, 40, 46, 47, 51, 54)
a<-c();for (i in 1:95){if(windsurfers$val[[i]]$group1==1) {a<-c(a,windsurfers$val[[i]]$vertex.names)}}; length(intersect(a, group1))
# [1] 7 The output should be 22
group2 <-c(9, 10, 14, 15, 20, 21, 23:27, 29, 32, 33, 41:45, 49, 52)
a<-c();for (i in 1:95){if(windsurfers$val[[i]]$group2==1) {a<-c(a,windsurfers$val[[i]]$vertex.names)}};length(intersect(a, group2))
# [1] 9  The output should be 21