无法从sklearn导入“ LogisticRegression”

时间:2019-08-07 06:23:12

标签: python-3.x scikit-learn

在导入代码时出现LogisticRegression的导入错误。

from sklearn.model_selection import LogisticRegression

错误:-

Traceback (most recent call last):
  File "e:\VSCODE\GIT_Hub\myML\Proj2-FruitSurvey-SimpleClassificationModels\ML-Models.py", line 78, in <module>
from sklearn.model_selection import LogisticRegression
ImportError: cannot import name 'LogisticRegression'

加载其他模块(如

)时我没有问题
from sklearn.model_selection import GridSearchCV,cross_validate
from sklearn.model_selection import train_test_split

我正在使用python版本= 3.6.5            scikit-learn = 0.21.0            窗户10            代码编辑器= vscode

1 个答案:

答案 0 :(得分:1)