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

Order of labels change the outcome of VD.A #53

Open
GiovaniGuizzo opened this issue Jun 17, 2020 · 1 comment
Open

Order of labels change the outcome of VD.A #53

GiovaniGuizzo opened this issue Jun 17, 2020 · 1 comment
Assignees
Labels

Comments

@GiovaniGuizzo
Copy link
Contributor

GiovaniGuizzo commented Jun 17, 2020

I ran into this issue the other day. Try to run the following code:

require(effsize)

nsga2<-c(0.59, 0.6, 0.58, 0.59, 0.65, 0.6, 0.59, 0.59, 0.59, 0.6, 0.62, 0.59, 0.61, 0.58, 0.6, 0.61, 0.6, 0.59, 0.59, 0.59, 0.59, 0.6, 0.58, 0.62, 0.56, 0.64, 0.6, 0.62, 0.58, 0.6)
moead<-c(0.47, 0.48, 0.46, 0.48, 0.47, 0.47, 0.44, 0.45, 0.45, 0.47, 0.45, 0.44, 0.46, 0.46, 0.44, 0.41, 0.44, 0.45, 0.45, 0.46, 0.49, 0.44, 0.46, 0.42, 0.5, 0.5, 0.49, 0.48, 0.45, 0.45)

categs <- rep(c("NSGA-II", "MOEA/D"), each=30)
VD.A(c(nsga2,moead), categs)

categs <- rep(c("MOEA/D", "NSGA-II"), each=30)
VD.A(c(nsga2,moead), categs)

The first call of VD.A yields 0 and the second yields 1 by just inverting the labels (wrong answers by the way). Notice that the vectors are not inverted when calling VD.A, only the labels. If one runs VD.A(c(nsga2,moead)) the correct answer 1 is given.

I am not entirely sure, but this does not look like the intended behaviour. I have tested it on Linux and Windows. My version of R is 4.0.1.

Thanks.

@mtorchiano
Copy link
Owner

Thanks for the report. I will look into it, I fixed a similar bug in another function.

@mtorchiano mtorchiano self-assigned this Jun 18, 2020
@mtorchiano mtorchiano added the bug label Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants