R version used: 3.6.3, mlr3 version: 0.4.0-9000, mlr3proba version: 0.1.6.9000, mlr3pipelines version: 0.1.2 and xgboost version: 0.90.0.2 (as stated on Rstudio package manager)
I have deployed the following graph pipeline:
imputePipe = PipeOpImputeMean$new(id = "imputemean", param_vals = list())
survXGPipe = mlr_pipeops$get("learner",lrn("surv.xgboost"))
graphXG= Graph$new()$
add_pipeop(imputePipe)$
add_pipeop(po("learner", lrn("surv.kaplan")))$
add_pipeop(survXGPipe)$
add_pipeop(po("distrcompose"))$
add_edge("imputemean","surv.kaplan")$
add_edge("imputemean","surv.xgboost")$
add_edge("surv.kaplan","distrcompose", dst_channel = "base")$
add_edge("surv.xgboost","distrcompose", dst_channel = "pred")
Unfortunately upon executing the following commands:
lrnXG = GraphLearner$new(graphXG)
trainResults = glrnXG$train(trainVerTask, row_ids = trainDataInd)
predictionResults = glrnXG$predict(trainVerTask, row_ids = verDataInd)
When the predict function is called the following error is returned:
Error in cdf[i, ] : subscript out of bounds
This error seems to be specific to the distrcompose function since I tried implementing simple graphs using only surv.xgboost, surv.kaplan and it does not show up.
It also seems to be data inspecific since I tried changing the input data and as long as distrcompose is used the same error is returned. Please let me know if you would like me to provide any further information concernign the matter, thank you in advance for your time.
Please use the following code to reproduce the error:
library(mlr3)
library(mlr3pipelines)
library(mlr3proba)
library(mlr3learners)
task = tgen("simsurv")$generate(1000)
imputePipe = PipeOpImputeMean$new(id = "imputemean", param_vals = list())
survXGPipe = mlr_pipeops$get("learner",lrn("surv.xgboost"))
graphXG= Graph$new()$
add_pipeop(imputePipe)$
add_pipeop(po("learner", lrn("surv.kaplan")))$
add_pipeop(survXGPipe)$
add_pipeop(po("distrcompose"))$
add_edge("imputemean","surv.kaplan")$
add_edge("imputemean","surv.xgboost")$
add_edge("surv.kaplan","distrcompose", dst_channel = "base")$
add_edge("surv.xgboost","distrcompose", dst_channel = "pred")
lrnXG = GraphLearner$new(graphXG)
trainResults = lrnXG$train(task, row_ids = 1:900)
lrnXG$predict(task, row_ids = 901:1000)