ModuleNotFoundError: No module named 'sklearn.lda'

27 次浏览
UUID
Unique One

from sklearn.lda import LDA

from sklearn.qda import QDA


一直报错:ModuleNotFoundError: No module named 'sklearn.lda'。然后注释掉LDA那行,又报错No module named 'sklearn.qda'。求解决方案!先谢各位了!

1 回答 07-22
lamdba

嗯……你有安装sklearn嘛

就是那个在命令行pip install sklearn

2 评论 1 07-24
紫色蒲公英
不折不扣的AI菜鸟一只!
已采纳

应该是版本更新问题吧,试试:

from sklearn.discriminant_analysis import LinearDiscriminantAnalysis as LDA
from sklearn.discriminant_analysis import QuadraticDiscriminantAnalysis as QDA

参考随机森林(Random Forest)

3 评论 1 07-24
需要登录后才能回答哟~ 点击
相关推荐