diff --git a/R/PipeOpBreslow.R b/R/PipeOpBreslow.R index 3e8a1d140..efd637bd1 100644 --- a/R/PipeOpBreslow.R +++ b/R/PipeOpBreslow.R @@ -124,6 +124,7 @@ PipeOpBreslow = R6Class("PipeOpBreslow", # keep the training data that Breslow estimator needs self$state = list( + learner = learner, times = task$times(), status = task$status(), lp_train = p$lp @@ -134,7 +135,7 @@ PipeOpBreslow = R6Class("PipeOpBreslow", .predict = function(inputs) { task = inputs[[1]] - learner = private$.learner + learner = self$state$learner if (is.null(learner$model)) { stopf("Cannot predict, Learner '%s' has not been trained yet", learner$id)