Sklearn, gridsearch: how to print out progress during the execution?

doubts picture doubts · Jun 9, 2014 · Viewed 39.4k times · Source

I am using GridSearch from sklearn to optimize parameters of the classifier. There is a lot of data, so the whole process of optimization takes a while: more than a day. I would like to watch the performance of the already-tried combinations of parameters during the execution. Is it possible?

Answer

DavidS picture DavidS · Jun 10, 2014

Set the verbose parameter in GridSearchCV to a positive number (the greater the number the more detail you will get). For instance:

GridSearchCV(clf, param_grid, cv=cv, scoring='accuracy', verbose=10)