ImportError: No module named grid_search, learning_curve
ImportError: No module named grid_search, learning_curve
Scikit 学习问题我无法使用 Sklearn 的 learning_curve 和 sklearn.grid_search
。
当我做 import sklearn
(有效)from sklearn.cluster import bicluster
(有效)。我尝试重新安装 scikit-learn 也仍然是同样的问题。我正在使用 python 3.5.6,Scikit-learn 版本 0.20.0 Window 10.
import sklearn
from sklearn.model_selection import StratifiedKFold, cross_val_score,
train_test_split
from sklearn.grid_search import GridSearchCV
from sklearn.learning_curve import learning_curve
在新版本中,这些在 model_selection
模块中。
使用这个:
from sklearn.model_selection import learning_curve, GridSearchCV
Scikit 学习问题我无法使用 Sklearn 的 learning_curve 和 sklearn.grid_search
。
当我做 import sklearn
(有效)from sklearn.cluster import bicluster
(有效)。我尝试重新安装 scikit-learn 也仍然是同样的问题。我正在使用 python 3.5.6,Scikit-learn 版本 0.20.0 Window 10.
import sklearn
from sklearn.model_selection import StratifiedKFold, cross_val_score,
train_test_split
from sklearn.grid_search import GridSearchCV
from sklearn.learning_curve import learning_curve
在新版本中,这些在 model_selection
模块中。
使用这个:
from sklearn.model_selection import learning_curve, GridSearchCV