@@ -47,7 +47,7 @@ test_that("predict_types are recognized", {
4747 learner1 $ predict_type = " se"
4848 learner2 = lrn(" regr.rpart" )
4949 learner2 $ predict_type = " response"
50- surrogate = SurrogateLearnerCollection $ new(learner = list (learner1 , learner2 ), archive = inst $ archive )
50+ surrogate = SurrogateLearnerCollection $ new(learners = list (learner1 , learner2 ), archive = inst $ archive )
5151 surrogate $ update()
5252
5353 xdt = data.table(x = seq(- 1 , 1 , length.out = 5L ))
@@ -58,7 +58,7 @@ test_that("predict_types are recognized", {
5858
5959test_that(" param_set" , {
6060 inst = MAKE_INST(OBJ_1D_2 , PS_1D , trm(" evals" , n_evals = 5L ))
61- surrogate = SurrogateLearnerCollection $ new(learner = list (REGR_FEATURELESS , REGR_FEATURELESS $ clone(deep = TRUE )), archive = inst $ archive )
61+ surrogate = SurrogateLearnerCollection $ new(learners = list (REGR_FEATURELESS , REGR_FEATURELESS $ clone(deep = TRUE )), archive = inst $ archive )
6262 expect_r6(surrogate $ param_set , " ParamSet" )
6363 expect_setequal(surrogate $ param_set $ ids(), c(" assert_insample_perf" , " perf_measures" , " perf_thresholds" , " catch_errors" , " impute_method" ))
6464 expect_equal(surrogate $ param_set $ class [[" assert_insample_perf" ]], " ParamLgl" )
@@ -77,7 +77,7 @@ test_that("insample_perf", {
7777 design = MAKE_DESIGN(inst )
7878 inst $ eval_batch(design )
7979
80- surrogate = SurrogateLearnerCollection $ new(learner = list (REGR_KM_DETERM , REGR_KM_DETERM $ clone(deep = TRUE )), archive = inst $ archive )
80+ surrogate = SurrogateLearnerCollection $ new(learners = list (REGR_KM_DETERM , REGR_KM_DETERM $ clone(deep = TRUE )), archive = inst $ archive )
8181 expect_error({surrogate $ insample_perf = c(0 , 0 )}, regexp = " insample_perf is read-only." )
8282 expect_error({surrogate $ assert_insample_perf = 0 }, regexp = " assert_insample_perf is read-only." )
8383
@@ -91,7 +91,7 @@ test_that("insample_perf", {
9191 expect_double(surrogate $ insample_perf , lower = - Inf , upper = 1 , any.missing = FALSE , len = 2L )
9292 expect_equal(names(surrogate $ insample_perf ), map_chr(surrogate $ param_set $ values $ perf_measures , " id" ))
9393
94- surrogate_constant = SurrogateLearnerCollection $ new(learner = list (REGR_FEATURELESS , REGR_FEATURELESS $ clone(deep = TRUE )), archive = inst $ archive )
94+ surrogate_constant = SurrogateLearnerCollection $ new(learners = list (REGR_FEATURELESS , REGR_FEATURELESS $ clone(deep = TRUE )), archive = inst $ archive )
9595 surrogate_constant $ param_set $ values $ assert_insample_perf = TRUE
9696 surrogate_constant $ param_set $ values $ perf_thresholds = c(0.5 , 0.5 )
9797 surrogate_constant $ param_set $ values $ perf_measures = list (mlr_measures $ get(" regr.rsq" ), mlr_measures $ get(" regr.rsq" ))
0 commit comments