-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
the method to precess missing value #5
Comments
ps:之所以倾向于构建训练集A,是因为应用场景的特征高维稀疏。训练集A可以降低硬盘存储和训练模型的内存 |
你好, 训练数据格式有这么一个约定:如果某一维特征没有出现在样本中,则认为这条样本中这一维特征为缺失(N/A,not available)。 树模型拟合过程中,也会对缺失值进行特殊的处理。 所以目前数据格式中对于特征值为0的情况也得显示的标明。 另外,从训练复杂度来看的话,树模型的训练时间和特征维度成正比,如果特征维度特别高的话,树模型的训练时间会特别大,可以考虑尝试其他模型(LR、FM、FFM等) |
你好, |
比如xgboost的方案是把missing value的样本全分到左孩子节点 |
你好,这个实现中,是用一颗“三叉树”来处理missing value情况的:左右子节点+NaN节点。 所以对数据格式有了这样的要求。 如果你期望实现sparse的数据格式,可以简单修改一下数据加载模块: Line 44 in 5aa5b9f
将初始值从kUnknownValue改为0即可以了。 希望能帮助到你。 多谢 |
好的,另外有个疑问哈,如果是三叉树的话,训练集A的auc为什么不是1呢 |
特征0 非miss即判断为0类别,miss即判断为1类别 |
目前的处理逻辑是NaN是单独放到一个节点,对剩余的样本进行分裂。
在这个issue的例子当中,由于特征除了NaN就是1(或者就是0),分裂无法进行,所以会导致上述结果。
…On Mon, Aug 27, 2018 at 5:43 PM PseudoProgrammer ***@***.***> wrote:
特征0 非miss即判断为0类别,miss即判断为1类别
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#5 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABd-du4A9Er3Ntk923t4PjE7sYkd3X04ks5uU787gaJpZM4WFRsH>
.
--
|
okay,了解了,谢谢!那我把所有miss的值用计算机的最小值补全,则miss值会分配到左孩子节点。你觉得这样做会不会有什么问题呢? |
模型在处理missing value有点问题,麻烦看一下,谢谢!
这是我构造的训练集A,20条样本,训练集上的auc=0.55
0 1 0:1
0 1 0:1
0 1 0:1
0 1 0:1
0 1 0:1
0 1 0:1
0 1 0:1
0 1 0:1
0 1 0:1
0 1 0:1
1 1 1:1
1 1 1:1
1 1 1:1
1 1 1:1
1 1 1:1
1 1 1:1
1 1 1:1
1 1 1:1
1 1 1:1
1 1 1:1
训练集合B,对A补全了特征,20条样本,训练集上auc=1
0 1 0:1 1:0
0 1 0:1 1:0
0 1 0:1 1:0
0 1 0:1 1:0
0 1 0:1 1:0
0 1 0:1 1:0
0 1 0:1 1:0
0 1 0:1 1:0
0 1 0:1 1:0
0 1 0:1 1:0
1 1 0:0 1:1
1 1 0:0 1:1
1 1 0:0 1:1
1 1 0:0 1:1
1 1 0:0 1:1
1 1 0:0 1:1
1 1 0:0 1:1
1 1 0:0 1:1
1 1 0:0 1:1
The text was updated successfully, but these errors were encountered: