當使用
import sklearn
sklearn.linear_model.LogisticRegression() 報如下錯誤
AttributeError: module 'sklearn' has no attribute 'linear_model'
修改為:
from sklearn.linear_model import LogisticRegression
LogisticRegression()
即可
好像sklearn不會自動導入其子包