AttributeError: module 'sklearn' has no attribute 'linear_model'

AttributeError: module ‘sklearn’ has no attribute ‘linear_model’

import sklearn

改成

from sklearn.linear_model import LinearRegression

同時,後續代碼由

sklearn.linear_model.LinearRegression()

調整爲

LinearRegression()
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章