I am trying to extract coefficients for a result of the makeStackedLearner function (mlr package) where the meta learner is fitting a GLM or similar. Knowing coefficients is very useful to see which individual models contribute the most to final predictions.
I have asked this questions via the mlr github issues (https://github.com/mlr-org/mlr/issues/2598).
library(mlr)
data(BostonHousing, package = "mlbench")
tsk = makeRegrTask(data = BostonHousing, target = "medv")
base = c("regr.rpart", "regr.svm")
lrns = lapply(base, makeLearner)
m = makeStackedLearner(base.learners = lrns,
predict.type = "response", method = "compress")
tmp = train(m, tsk)
Where to find the regression coefficients of the super.model?
> names(tmp$learner.model)
[1] "method" "base.learners" "super.model" "pred.train"