Ptvs: sklearn deprecation triggered by ML samples

Created on 24 Feb 2017  路  6Comments  路  Source: microsoft/PTVS

Our ML samples trigger the following warning from scikit-learn (as of Anaconda 4.3.0):

C:\Program Files\Anaconda3\lib\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)

Templates bug

All 6 comments

Changing

from sklearn.cross_validation import train_test_split

to

from sklearn.model_selection import train_test_split

appears to work fine, without warnings.

I have the same problem , please could you tell me how to solve it I tried many ways

Try changing the import as mentioned above.

Thank you that works for me

@huguesv please can I talk to you in private (email...) I have a problem in my code

Was this page helpful?
0 / 5 - 0 ratings