Skip to content

Commit b29d5e8

Browse files
committed
fix global variable binding and function definition for data.table expressions
1 parent f2b221b commit b29d5e8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

R/PipeOpLearnerPICVPlus.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,9 @@ PipeOpLearnerPICVPlus = R6Class("PipeOpLearnerPICVPlus",
171171
prds = rbindlist(map(rr$predictions(predict_sets = "test"), as.data.table), idcol = "fold")
172172

173173
# Add states of trained models and residuals to PipeOp state
174+
fold = NULL # for binding
174175
self$state = list(cv_model_states = map(rr$learners, "state"),
175-
residuals = prds[, .(fold, residual = abs(truth - response))])
176+
residuals = prds[, list(fold, residual = abs(truth - response))])
176177

177178
list(NULL)
178179
},
@@ -240,5 +241,3 @@ unmarshal_model.pipeop_learner_pi_cvplus_state_marshaled = function(model, inpla
240241
}
241242

242243
mlr_pipeops$add("learner_pi_cvplus", PipeOpLearnerPICVPlus, list(R6Class("Learner", public = list(id = "learner_pi_cvplus", task_type = "regr", param_set = ps(), packages = "mlr3pipelines"))$new()))
243-
244-

0 commit comments

Comments
 (0)