我正在使用包"TuneRanger“来调优射频模型。它工作良好,我取得了很好的结果,但我不确定它是否过分适合我的模型。我想使用一个重复的简历,为每一个实例,包是调优模型,但我找不到一个方法来做。另外,我想知道是否有人知道这个包如何验证每次尝试的结果(火车测试,cv,重复cv?)我一直在阅读这个包裹(https://cran.r-project.org/web/packages/tuneRanger/tuneRanger.pdf)的说明,但它并没有提到它。
谢谢你的帮助。
发布于 2020-08-22 15:40:23
包外的估计是用来估计误差的,我不认为你可以用那个包转到简历上。这取决于你决定简历是否比这更好。在他们的自述文件中,他们链接到一个出版,在第3.5节中他们写道:
公开的预测用于评估,这比其他使用评估策略的包(如交叉验证)要快得多。
如果要使用交叉验证或重复交叉验证,则必须使用caret
,例如:
library(caret)
mdl = train(Species ~ .,data=iris,method="ranger",trControl=trainControl(method="repeatedcv",repeats=2),
tuneGrid = expand.grid(mtry=2:3,min.node.size = 1:2,splitrule="gini"))
Random Forest
150 samples
4 predictor
3 classes: 'setosa', 'versicolor', 'virginica'
No pre-processing
Resampling: Cross-Validated (10 fold, repeated 2 times)
Summary of sample sizes: 135, 135, 135, 135, 135, 135, ...
Resampling results across tuning parameters:
mtry min.node.size Accuracy Kappa
2 1 0.96 0.94
2 2 0.96 0.94
3 1 0.96 0.94
3 2 0.96 0.94
Tuning parameter 'splitrule' was held constant at a value of gini
Accuracy was used to select the optimal model using the largest value.
The final values used for the model were mtry = 2, splitrule = gini
and min.node.size = 1.
您可以调优的参数是不同的。我认为mlr
也允许您执行交叉验证,但同样的限制也适用。
https://stackoverflow.com/questions/63536361
复制相似问题