Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Group 1 labels #11

Open
zalmquist opened this issue Feb 14, 2022 · 6 comments
Open

Error in Group 1 labels #11

zalmquist opened this issue Feb 14, 2022 · 6 comments

Comments

@zalmquist
Copy link

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
Copy link
Author

zalmquist commented Feb 14, 2022

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

@mbojan
Copy link
Member

mbojan commented Feb 18, 2022

Does this apply to the windsurfers data?

@zalmquist
Copy link
Author

zalmquist commented Feb 18, 2022 via email

@skyebend
Copy link
Contributor

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
Copy link
Author

zalmquist commented Feb 18, 2022 via email

@giava90
Copy link

giava90 commented Mar 15, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants