MLR-面向堆叠学习器的超参数调整

时间:2018-08-22 21:50:28

标签: r mlr

我想使用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)

0 个答案:

没有答案