Skip to content

Commit

Permalink
don't make coord output test so dependent on spectral initialization …
Browse files Browse the repository at this point in the history
…method
  • Loading branch information
jlmelville committed Apr 20, 2024
1 parent 9dab6eb commit a72e839
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/testthat/test_output.R
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,7 @@ test_that("can set seed internally", {

# creating a model stores the seed but also forces annoy for nearest neighbors
# which changes the RNG state more than when FNN can be used internally
# 115: eh actually this is probably due more to irlba than RSpectra?
res_model <-
umap(
iris10,
Expand All @@ -1043,7 +1044,7 @@ test_that("can set seed internally", {
)
expect(res_model$seed, 42)
diff1m <- res - res_model$embedding
expect_gt(sqrt(sum(diff1m * diff1m) / length(diff1m)), 0.01)
expect_gt(sqrt(sum(diff1m * diff1m) / length(diff1m)), 1e-6)

# explicitly set annoy nn and things are reproducible again
res4 <-
Expand Down

0 comments on commit a72e839

Please sign in to comment.