diff --git a/R/ResamplingNestedCV.R b/R/ResamplingNestedCV.R index 6d044d2..115982e 100644 --- a/R/ResamplingNestedCV.R +++ b/R/ResamplingNestedCV.R @@ -75,7 +75,7 @@ ResamplingNestedCV = R6::R6Class("ResamplingNestedCV", pv = self$param_set$get_values() folds = pv$folds repeats = pv$repeats - self$primary_iters = as.vector(outer(seq_len(pv$folds), pv$folds^2 * seq(0, pv$repeats - 1), `+`)) + private$.primary_iters = as.vector(outer(seq_len(pv$folds), pv$folds^2 * seq(0, pv$repeats - 1), `+`)) map_dtr(seq(repeats), function(r) { data.table( row_id = ids, diff --git a/R/ResamplingPairedSubsampling.R b/R/ResamplingPairedSubsampling.R index 760e69f..ced610b 100644 --- a/R/ResamplingPairedSubsampling.R +++ b/R/ResamplingPairedSubsampling.R @@ -104,7 +104,7 @@ ResamplingPairedSubsampling = R6Class("ResamplingPairedSubsampling", repeats_out = pvs$repeats_out ratio = pvs$ratio - self$primary_iters = repeats_in + private$.primary_iters = repeats_in n = length(ids) n1 = round(n * ratio) diff --git a/man/mlr3inferr-package.Rd b/man/mlr3inferr-package.Rd index 810b14d..b40759a 100644 --- a/man/mlr3inferr-package.Rd +++ b/man/mlr3inferr-package.Rd @@ -6,6 +6,8 @@ \alias{mlr3inferr-package} \title{mlr3inferr: Inference on the Generalization Error} \description{ +\if{html}{\figure{logo.png}{options: style='float: right' alt='logo' width='120'}} + Confidence interval and resampling methods for inference on the generalization error. } \seealso{ diff --git a/tests/testthat/test_ResamplingNestedCV.R b/tests/testthat/test_ResamplingNestedCV.R index 0edff69..a656f2f 100644 --- a/tests/testthat/test_ResamplingNestedCV.R +++ b/tests/testthat/test_ResamplingNestedCV.R @@ -80,15 +80,15 @@ test_that("primary iters", { task$col_roles$stratum = "Species" r = rsmp("nested_cv", folds = 3, repeats = 1) r$instantiate(task) - expect_equal(r$primary_iters, 1:3) + expect_equal(get_private(r)$.primary_iters, 1:3) r$param_set$set_values( folds = 4L, repeats = 1 ) r$instantiate(task) - expect_equal(r$primary_iters, 1:4) + expect_equal(get_private(r)$.primary_iters, 1:4) r$param_set$set_values( folds = 4L, repeats = 2 ) r$instantiate(task) - expect_equal(r$primary_iters, c(1:4, 17:20)) + expect_equal(get_private(r)$.primary_iters, c(1:4, 17:20)) }) diff --git a/tests/testthat/test_ResamplingPairedSubsampling.R b/tests/testthat/test_ResamplingPairedSubsampling.R index 49d95ba..3f36e06 100644 --- a/tests/testthat/test_ResamplingPairedSubsampling.R +++ b/tests/testthat/test_ResamplingPairedSubsampling.R @@ -135,11 +135,11 @@ test_that("primary_iters", { task = tsk("iris") r = rsmp("paired_subsampling", repeats_in = 1, repeats_out = 1, ratio = 0.8) r$instantiate(task) - expect_equal(r$primary_iters, 1L) + expect_equal(get_private(r)$.primary_iters, 1L) r$param_set$values$repeats_in = 2 r$instantiate(task) - expect_equal(r$primary_iters, 2L) + expect_equal(get_private(r)$.primary_iters, 2L) r$instantiate(task) r$param_set$values$repeats_out = 2L - expect_equal(r$primary_iters, 2L) + expect_equal(get_private(r)$.primary_iters, 2L) })