2014-11-06 64 views
1

以下是运行列车功能我的输出:插入符包方法= “treebag”

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 

这是我的混淆矩阵

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? 

任何帮助将不胜感激!

回答

1

代码和一个可重复的例子在这里会有所帮助。

假设混淆矩阵来自confusionMatrix.train,那么我会说你的模型看起来不错。准确度的差异有点令人费解。我已经看到测试集的结果看起来比定期的重采样结果更差,但引导程序在测量性能方面可能非常悲观,并且在这里看起来比测试集好得多。尝试使用不同的训练/测试分组,并查看是否有类似的情况(或重复10次CV)。

(一)再次,很难与您发布该说些什么

(b)该模型是优秀的,没有一般规则关于哪种模式更好或更坏(谷歌的“没有免费的午餐”定理)

(c)该不平衡是不是太糟糕,所以我不认为这是一个问题(除非训练和测试集百分比不同)

最大