Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deprecation warning on XGBoost - Sklearn

I am using XGBClassifier() from XGBoost. I am getting the following deprecation warning.

Is there any solution to get rid of this warning ?

/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)

After 2 hours in 64 GB CPU machine, it is still running. I am not sure whether the time it takes may be because of this deprecation warning or the just the length of the dataset.

like image 763
Kathiravan Natarajan Avatar asked Jul 22 '17 05:07

Kathiravan Natarajan


2 Answers

This happens due to use_label_encoder which was used to encode the labels in sklearn.Since that is deprecated,you can set its value to False use_label_encoder =Falseand run the classifier.
Also, this has no impact on the performance of the model, this will just remove user warning that comes while running XGBClassifier.

like image 188
Sahil Bagnial Avatar answered Oct 23 '22 11:10

Sahil Bagnial


It is just a deprecation warning.

XGBClassifier uses deprecated functions of scikit-learn package.

Finally, if your performance is poor this is not the case. This message has nothing to do with the performance.

like image 4
seralouk Avatar answered Oct 23 '22 13:10

seralouk