Deprecation warning on XGBoost - Sklearn

Viewed 19172

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.

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.

Related