當使用
import sklearn
sklearn.linear_model.LogisticRegression() 報如下錯誤
AttributeError: module 'sklearn' has no attribute 'linear_model'
修改為:
from sklearn.linear_model import LogisticRegression
LogisticRegression()
即可
好像sklearn不會自動導入其子包
當使用
import sklearn
sklearn.linear_model.LogisticRegression() 報如下錯誤
AttributeError: module 'sklearn' has no attribute 'linear_model'
修改為:
from sklearn.linear_model import LogisticRegression
LogisticRegression()
即可
好像sklearn不會自動導入其子包
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。