Warning messages when using python

Dhara picture Dhara · Dec 20, 2016 · Viewed 14.6k times · Source

I keep getting this when I run SVM python code:

Warning (from warnings module):
  File "/usr/local/lib/python2.7/dist-packages/sklearn/cross_validation.py", line 44
    "This module will be removed in 0.20.", DeprecationWarning)
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.

Warning (from warnings module):
  File "/usr/local/lib/python2.7/dist-packages/sklearn/grid_search.py", line 43
    DeprecationWarning)
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. This module will be removed in 0.20.

What does this warning messages indicate?

Thanks in Advance

Answer

Samer Aamar picture Samer Aamar · Dec 20, 2016

the latest stable version of scikit-learn is 0.18 http://scikit-learn.org/stable/

The version you are using has deprecated these modules.
Alternatively use

    from sklearn.model_selection import train_test_split

Look at this discussion
https://github.com/rhiever/tpot/issues/284
and this comment:
https://github.com/rhiever/tpot/commit/84c5e26b447251088826737612ccf0817ef43db2