diff --git a/DESCRIPTION b/DESCRIPTION index 37fe1b5..ae13e61 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: mlr3learners.coxboost Title: Learners from the {CoxBoost} package for 'mlr3' -Version: 0.1.1.9000 +Version: 0.1.2 Authors@R: person(given = "Raphael", family = "Sonabend", diff --git a/NEWS.md b/NEWS.md index 6fb14cd..0a379de 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# mlr3learners.coxboost 0.1.2 + +- distr6 patch + # mlr3learners.coxboost 0.1.1 - Removed remotes dependencies diff --git a/R/LearnerSurvCVCoxboost.R b/R/LearnerSurvCVCoxboost.R index fb7f55b..387e2f3 100644 --- a/R/LearnerSurvCVCoxboost.R +++ b/R/LearnerSurvCVCoxboost.R @@ -186,7 +186,7 @@ LearnerSurvCVCoxboost = R6Class("LearnerSurvCVCoxboost", times = sort(unique(self$model$time))) # define WeightedDiscrete distr6 object from predicted survival function - x = rep(list(x = sort(unique(self$model$time)), cdf = 0), task$nrow) + x = rep(list(list(x = sort(unique(self$model$time)), cdf = 0)), task$nrow) for (i in 1:task$nrow) { x[[i]]$cdf = cdf[i, ] } diff --git a/R/LearnerSurvCoxboost.R b/R/LearnerSurvCoxboost.R index c92356c..aa34c45 100644 --- a/R/LearnerSurvCoxboost.R +++ b/R/LearnerSurvCoxboost.R @@ -118,7 +118,7 @@ LearnerSurvCoxboost = R6Class("LearnerSurvCoxboost", times = sort(unique(self$model$time))) # define WeightedDiscrete distr6 object from predicted survival function - x = rep(list(x = sort(unique(self$model$time)), cdf = 0), task$nrow) + x = rep(list(list(x = sort(unique(self$model$time)), cdf = 0)), task$nrow) for (i in 1:task$nrow) { x[[i]]$cdf = cdf[i, ] } diff --git a/tests/testthat/test_surv_coxboost.R b/tests/testthat/test_surv_coxboost.R index 962bec5..9a76e59 100644 --- a/tests/testthat/test_surv_coxboost.R +++ b/tests/testthat/test_surv_coxboost.R @@ -3,6 +3,6 @@ context("surv.coxboost") test_that("autotest", { learner = LearnerSurvCoxboost$new() expect_learner(learner) - result = run_autotest(learner) + result = run_autotest(learner,check_replicable = FALSE) expect_true(result, info = result$error) }) diff --git a/tests/testthat/test_surv_cvcoxboost.R b/tests/testthat/test_surv_cvcoxboost.R index aa11bb3..f834513 100644 --- a/tests/testthat/test_surv_cvcoxboost.R +++ b/tests/testthat/test_surv_cvcoxboost.R @@ -4,7 +4,7 @@ test_that("autotest", { set.seed(1) learner = lrn("surv.cvcoxboost", maxstepno = 1, K = 2) expect_learner(learner) - result = run_autotest(learner, N = 10) + result = run_autotest(learner, N = 10,check_replicable = FALSE) expect_true(result, info = result$error) })