以下是我运行训练函数的输出:
Bagged CART
1251 samples
30 predictors
2 classes: 'N', 'Y'
No pre-processing
Resampling: Bootstrapped (25 reps)
Summary of sample sizes: 1247, 1247, 1247, 1247, 1247, 1247, ...
Resampling results
Accuracy Kappa Accuracy SD Kappa SD
0.806 0.572 0.0129 0.0263 这是我的confusionMatrix
Bootstrapped (25 reps) Confusion Matrix
(entries are percentages of table totals)
Reference
Prediction N Y
N 24.8 7.9
Y 11.5 55.8在划分数据集- 80%的训练和20%的测试后,我训练模型,然后在我的测试分区上进行“预测”,并获得~65%的准确率。
问题:
(1) Does this mean my model is not very good?
(2) Is 'treebag' the proper method since I only have 2 classes: 'N', 'Y' ? Would a Logistic Regression method be better?
(3) Finally, my 1251 samples are roughly 67% 'Y' and 33% 'N'. Could this be "skewing" my training / results? Do I need a ratio closer to 50 - 50?任何帮助都将不胜感激!
发布于 2014-11-15 04:43:22
代码和可重现的示例在这里会有所帮助。
假设混淆矩阵来自运行confusionMatrix.train,那么我会说你的模型看起来很好。精度上的差异有点令人费解。我经常看到测试集的结果看起来比重采样的结果差,但是bootstrap在测量性能时可能非常悲观,而在这里它看起来比测试集好得多。尝试不同的训练/测试分割,看看你是否得到了类似的结果(或者尝试重复10倍的CV)。
(a)再说一次,很难说你所发布的内容
(b)该模型非常优秀,没有关于哪种模型更好或更差的一般规则(谷歌“没有免费午餐”定理)
(c)这种不平衡并不是太糟糕,所以我不认为这是一个问题(除非训练和测试集的百分比不同)
最大值
https://stackoverflow.com/questions/26789239
复制相似问题