XGBoost 上的弃用警告 - Sklearn

Deprecation warning on XGBoost - Sklearn

我正在使用 XGBoost 的 XGBClassifier()。我收到以下弃用警告。

是否有解决此警告的方法?

/home/carnd/anaconda3/envs/dl/lib/python3.5/site-packages/sklearn/cross_validation.py:44: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.
  "This module will be removed in 0.20.", DeprecationWarning)

在 64 GB CPU 机器上 2 小时后,它仍然是 运行。我不确定它所花费的时间是否可能是因为这个弃用警告或只是数据集的长度。

这只是一个弃用警告。

XGBClassifier 使用 scikit-learn 包的弃用函数。

最后,如果你的表现不佳,情况并非如此。此消息与演出无关。

发生这种情况是因为 use_label_encoder 用于对 sklearn.Since 中的标签进行编码,但已弃用,您可以将其值设置为 False use_label_encoder =False 和 运行 分类器。
此外,这对模型的性能没有影响,这只会删除 运行ning XGBClassifier 时出现的用户警告。