注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
LZ想请教如何manually implement 一些简单的bagging / boosting
task是二元分类 data heavily imbalanced
base classifier 是decision tree 并且由于production env和compliance的限制 后续weak learners也必须是DT
-baidu 1point3acres
..
已经有了Tree 1,performance还不错 应该已经达到了一棵树的上限了,这里可以看作tree 1是一个strong base learner,LZ想额外找1-2个tree试图提升它的performance
.google и
A. 用bagging ("random" forest)
1. 需不需要resample training data
2. 我必须在Tree 2用不同的feature吗?不然应该就没意义了?假设我在Tree 1几乎把好的feature都用了 (ABCD),可能还剩一个feature E还凑合,Tree 2可不可以用A*B+E?(试图减小与Tree 1的correlation). ----
3. Tree 2需要调参吗?还是用和Tree 1一样的model
4. 必须要奇数个tree (3)吗? 不然没办法决定最终的class? 可是第三个tree我实在找不出feature了。。
. 1point3acres
B. 用boosting
1. data 怎么re-assign weight? 我们的target是找出所有positive (1) .--
manger建议快捷做法是 remove所有被Tree 1 label成pos的 用Tree 2找剩下data里的pos
细想觉得不妥 因为pos包括true positive和flase positive 而boosting核心思路是调节incorrectly classified sample的weight (增加FP和FN的weight)
增加FP的weight 会让他们更容易变成TN?增加FN的weight 会让他们更容易变成TP?是这个意思嘛
2. 我必须在Tree 2用相同的feature吗?Tree 2可不可以用featureA*featureB+featureE?
3. 同A3. 1point 3acres
4. 如果只用两个tree怎么决定最终的class 我可以说tree 1 or tree 2 = 1, then final = 1, else 0吗?(Tree 1 performance较好,是否不应该用majority vote?). From 1point 3acres bbs
除了feature engineering 还有什么别的方法可以提升 model performance?
总的model必须是人能看懂的rule-based, 可以翻译成例如if conditionA then class1, if conditionB then class0 ..
感谢大佬们指点 如果可以回答一部分问题也非常感谢 会回来加米的~ |