我使用R中的插入符号包来使用立体主义模型树构建一个回归模型,该树有两个调优参数:
优化参数:委员会(#委员会),邻居(#实例)
我认为我试图不正确地实现调优参数,需要一些帮助来解决这个问题。按照插入符号站点上的示例,我为优化参数构建了一个网格,如下所示:
cubistGrid <- expand.grid(committees = 30, neighbors = 10)
然后,我使用如下的火车函数调用网格:
LMFit1 <- train(Total~., data = training, method = "cubist", trControl = fitControl, tuneGrid = cubistGrid)
I‘我得到了以下错误:
Something is wrong; all the RMSE metric values are missing:
我对我的数据没有任何问题,因为到目前为止我已经在它上运行了许多模型;这是我第一次使用调优参数。
谢谢,
本
发布于 2016-04-01 03:26:30
首先,不是reproducible example,但是如果您检查警告,您将看到以下内容:
预测失败: Resample1: committees=30,predict.cubist中的neighbors=10错误(modelFit,newdata,predict.cubist=modelFit$tuneValue$predict.cubist):“邻居”必须小于10
将邻居设置为小于10的值,这将处理空的rmse度量。
https://stackoverflow.com/questions/36342388
复制相似问题