Kat*_*jan 8 python-3.x scikit-learn xgboost
我正在使用 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)
Run Code Online (Sandbox Code Playgroud)
在 64 GB CPU 机器上运行 2 小时后,它仍在运行。我不确定所花费的时间是否是由于此弃用警告或只是数据集的长度所致。
小智 10
发生这种情况是由于 use_label_encoder 用于对 sklearn 中的标签进行编码。由于它已被弃用,您可以将其值设置为 False
use_label_encoder =False
并运行分类器。
此外,这对模型的性能没有影响,这只会消除运行 XGBClassifier 时出现的用户警告。
归档时间: |
|
查看次数: |
24236 次 |
最近记录: |