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

classDist test is flaky #1352

Open
MichaelChirico opened this issue Oct 2, 2023 · 0 comments
Open

classDist test is flaky #1352

MichaelChirico opened this issue Oct 2, 2023 · 0 comments

Comments

@MichaelChirico
Copy link

expect_true(length(distData$values) == length(unique(y)) - 1)

res <- replicate(1e4, {
  trainSet <- sample(1:150, 100)
  x = iris[trainSet, 1:4]
  y = as.numeric(iris$Species[trainSet])
  groups = 4

  distData <- classDist(x, y, pca = FALSE, groups = groups)
  length(distData$values) == length(unique(y)) - 1
})
table(res)
# res
# FALSE  TRUE 
#    21  9979 

How can we decrease the flakiness here?

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

1 participant