2

For grid search is always time consuming, so I want to see how much it run now. For example ,it might output

paramsXXX processed
paramsYYY processed
...
bakkal
  • 54,350
  • 12
  • 131
  • 107
mrbean
  • 171
  • 2
  • 15

2 Answers2

6

To get the progress, you can increase the verbosity in e.g. sklearn.grid_search.GridSearchCV, by adding the parameter verbose and giving it some positive value

GridSearchCV(..., verbose=1)

From the docs

verbose : integer

Controls the verbosity: the higher, the more messages.

bakkal
  • 54,350
  • 12
  • 131
  • 107
2

If you want to know how much time GridSearchCV will take, you can run RandomizedSearchCV with n_iter=10 before running GridSearchCV. Let's say RandomizedSearchCV with n_iter=10 took 10s, GridSearchCV with 100 iterations will take almost 100s. This will give you a fairly accurate idea of how much time will GridSearchCV take.

Or even better you can run RandomizedSearchCV with n_iter=half the iterations of GridSearchCV to get almost same results with half the time.

Abhishek Sharma
  • 1,909
  • 2
  • 15
  • 24