Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImportError: No module named grid_search, learning_curve

Problem with Scikit learn l can't use learning_curve of Sklearn and sklearn.grid_search.

When l do import sklearn (it works) from sklearn.cluster import bicluster (it works). i try to reinstall scikit-learn also remain the same issue. I am using python 3.5.6, Scikit-learn version 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
like image 273
Andy Hui Avatar asked Jan 31 '19 07:01

Andy Hui


1 Answers

In the new version these are in the model_selection module.

Use this:

from sklearn.model_selection import learning_curve, GridSearchCV
like image 168
seralouk Avatar answered Nov 03 '22 01:11

seralouk