使用 XGBClassifier 后如何保存填充的缺失数据?
How can I save filled missing data after using XGBClassifier?
我有一个包含缺失值的数据集,但这对 XGBClassifier 来说不是问题。它可以为您动态填充值。我想将这些功能保存为 XGBClassifier 填充它们。我的目标是使用 XGBoost 来估算缺失数据,然后我将尝试另一种不允许 NaN 值的算法。这可能吗?
XGBoost 可以处理 缺失值,但它不会填充它们。所以答案是否定的,你不能用它来填充特征中的缺失值。
在训练时,它处理缺失数据的方式是选择能够最小化每次拆分损失的方向。所以处理缺失数据的所有过程都是根据损失函数最小化的程度来选择最优路径,但不涉及价值插补。
这个是在publication中提到的:
The optimal default directions are learnt from the data. The key improvement is to only visit the non-missing
entries Ik. The presented algorithm treats the non-presence
as a missing value and learns the best direction to handle
missing values
我有一个包含缺失值的数据集,但这对 XGBClassifier 来说不是问题。它可以为您动态填充值。我想将这些功能保存为 XGBClassifier 填充它们。我的目标是使用 XGBoost 来估算缺失数据,然后我将尝试另一种不允许 NaN 值的算法。这可能吗?
XGBoost 可以处理 缺失值,但它不会填充它们。所以答案是否定的,你不能用它来填充特征中的缺失值。
在训练时,它处理缺失数据的方式是选择能够最小化每次拆分损失的方向。所以处理缺失数据的所有过程都是根据损失函数最小化的程度来选择最优路径,但不涉及价值插补。
这个是在publication中提到的:
The optimal default directions are learnt from the data. The key improvement is to only visit the non-missing entries Ik. The presented algorithm treats the non-presence as a missing value and learns the best direction to handle missing values