【发布时间】:2016-11-16 06:13:30
【问题描述】:
我一直在尝试了解重采样方法的更多细节,并在一个包含 1000 行的小型数据集上实现它们。数据分为 800 个训练集和 200 个验证集。我使用 K-fold 交叉验证和重复 K-fold 交叉验证来使用训练集训练 KNN。根据我的理解,我对结果做了一些解释——但是,我对它们有一定的怀疑(见下面的问题):
结果: 10 折 Cv
Resampling: Cross-Validated (10 fold)
Summary of sample sizes: 720, 720, 720, 720, 720, 720, ...
Resampling results across tuning parameters:
k Accuracy Kappa
5 0.6600 0.07010791
7 0.6775 0.09432414
9 0.6800 0.07054371
Accuracy was used to select the optimal model using the largest value.
The final value used for the model was k = 9.
重复 10 次重复 10 次
Resampling results across tuning parameters:
k Accuracy Kappa
5 0.670250 0.10436607
7 0.676875 0.09288219
9 0.683125 0.08062622
Accuracy was used to select the optimal model using the largest value.
The final value used for the model was k = 9.
10 倍,1000 次重复
k Accuracy Kappa
5 0.6680438 0.09473128
7 0.6753375 0.08810406
9 0.6831800 0.07907891
Accuracy was used to select the optimal model using the largest value.
The final value used for the model was k = 9.
10 倍,2000 次重复
k Accuracy Kappa
5 0.6677981 0.09467347
7 0.6750369 0.08713170
9 0.6826894 0.07772184
怀疑:
在选择参数时,
K=9是最高精度的最佳值。但是,我不明白在最终选择参数值时如何考虑Kappa?重复次数必须增加,直到我们得到稳定的结果,当重复次数从 10 增加到 1000 时,精度会发生变化。但是,1000 次重复和 2000 次重复的结果相似。将 1000/2000 次重复的结果视为稳定的性能估计是否正确?
任何重复编号的经验法则?
最后,我应该在我的完整训练数据(800 行)上训练模型,现在测试验证集的准确性吗?
【问题讨论】:
标签: machine-learning cross-validation resampling