11test_that(" compute_sequentially works with preference data" , {
2- dat <- subset(pairwise_preferences , user < = 20 )
2+ dat <- subset(pairwise_preferences , user < = 24 )
33 topological_sorts <- split(dat , f = ~ timepoint ) | >
44 lapply(split , f = ~ user ) | >
55 lapply(function (x ) {
@@ -23,8 +23,8 @@ test_that("compute_sequentially works with preference data", {
2323 topological_sorts = topological_sorts
2424 )
2525
26- expect_gt(mean(mod $ alpha ), 1.03 )
27- expect_lt(mean(mod $ alpha ), 1.06 )
26+ expect_gt(mean(mod $ alpha ), 1 )
27+ expect_lt(mean(mod $ alpha ), 1.02 )
2828})
2929
3030test_that(" compute_sequentially works with preference data and tracing" , {
@@ -55,8 +55,8 @@ test_that("compute_sequentially works with preference data and tracing", {
5555
5656 expect_equal(length(mod $ alpha_traces ), 3 )
5757 expect_equal(length(mod $ alpha_traces [[2 ]]), 100 )
58- expect_gt(mod $ alpha_traces [[2 ]][[3 ]], .7 )
59- expect_lt(mod $ alpha_traces [[2 ]][[3 ]], .8 )
58+ expect_gt(mod $ alpha_traces [[2 ]][[3 ]], .24 )
59+ expect_lt(mod $ alpha_traces [[2 ]][[3 ]], .25 )
6060
6161 set.seed(3 )
6262 mod <- compute_sequentially(
@@ -72,13 +72,13 @@ test_that("compute_sequentially works with preference data and tracing", {
7272
7373 expect_equal(length(mod $ alpha_traces ), 3 )
7474 expect_equal(length(mod $ alpha_traces [[2 ]]), 100 )
75- expect_gt(mod $ alpha_traces [[2 ]][[3 ]], .7 )
76- expect_lt(mod $ alpha_traces [[2 ]][[3 ]], .8 )
75+ expect_gt(mod $ alpha_traces [[2 ]][[3 ]], .04 )
76+ expect_lt(mod $ alpha_traces [[2 ]][[3 ]], .05 )
7777
7878 expect_equal(length(mod $ latent_rankings_traces ), 3 )
7979 expect_equal(length(mod $ latent_rankings_traces [[2 ]]), 100 )
8080 expect_equal(
8181 mod $ latent_rankings_traces [[2 ]][[3 ]],
82- c(1 , 2 , 5 , 3 , 4 , 2 , 1 , 4 , 5 , 3 )
82+ c(1 , 3 , 5 , 4 , 2 , 2 , 1 , 4 , 3 , 5 )
8383 )
8484})
0 commit comments