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
这段英文的大致意思是说: 在0.18版本中不推荐使用此模块,而是支持所有重构的类和函数移动到的model_selection模块。 另请注意,新CV迭代器的接口与此模块的接口不同。 该模块将在0.20版本中删除。
主要意思 : 主要意思是说在0.18版本中,cross_validation被废弃了,在 0.20版本中,将被删除
解决方法:
将 from sklearn.cross_validation import cross_val_score 修改为 :从 model_selection 中导入 cross_val_score 即可
也即是: from sklearn.model_selection import cross_val_score