我想使用tuneparams函数在stackedlearner上进行参数搜索。我还想使用基准功能来针对基础学习者的不同组合进行基准测试。
我尝试过但没有成功:
ctrl <- makeTuneControlGrid(resolution = 10)
rdesc <- makeResampleDesc("CV", iters = 5L)
stackparams <- makeParamSet(
makeDiscreteParam("method", c("average", "stack.nocv", "stack.cv", "hill.climb", "compress"))
,makeDiscreteParam("super.learner", c("regr.randomForest", "regr.glm", "regr.xgboost", "regr.gbm"))
)
stack <- tuneParams(makeStackedLearner(base.learners = list(lrn.mars,lrn.cvglmnet,lrn.glmboost)
,predict.type = "response"), task = reg.task, resampling = rdesc, measures = list(rmse),
par.set = stackparams, control = ctrl)