I have a stacked learner where the output layer is a regr.ranger
with params list(rf.quantreg = TRUE, rf.keep.inbag = TRUE)
. Is it possible to predict quantiles with GraphLearner
s like this?
I know that for a pure lrn('regr.ranger')
, once trained, I can simply reference the ranger
model directly and use that for quantile prediction:
predict(my_learner$model, data = my_test_data, type = "quantiles", quantiles = c(0.025, 0.975))
But for the stacked learner, I have other learners mediating between the features and regr.ranger
, so it seems to me that I have to go via mlr3
.
My GraphLearner
consists of some feature coding, a regr.kknn
learner and a regr.glm
learner plus some extras. Then rf
(a regr.ranger
) sits at the output level: