解決辦法:
更新sklearn庫
具體方法:
1.打開anaconda下的anaconda的Promote
2.輸入 pip list 可以查看當前已經安裝的包和版本
3.更新sklearn:
輸入”conda update scikit-learn”
參考:
AttributeError: 'OneHotEncoder' object has no attribute 'n_values_'
安裝指定version的包:
pip install scikit-learn==0.19.2
解決辦法:
更新sklearn庫
具體方法:
1.打開anaconda下的anaconda的Promote
2.輸入 pip list 可以查看當前已經安裝的包和版本
3.更新sklearn:
輸入”conda update scikit-learn”
參考:
AttributeError: 'OneHotEncoder' object has no attribute 'n_values_'
安裝指定version的包:
pip install scikit-learn==0.19.2
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。