1. 程式人生 > >成功解決This module was deprecated in version 0.18 in favor of the model_selection module into which all

成功解決This module was deprecated in version 0.18 in favor of the model_selection module into which all

解決問題:


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中刪除。本模組將被刪除,deprecationwarning)0.20。

很清楚,是版本問題,升級導致的不相容!

解決辦法:

將機器學習庫的cross_validation 改為model_selection即可!

大功告成!繼續學習啦!