2

If I interrupt grid_search.fit() before completion will I loose everything it's done so far? I got a little carried away with my grid search and provided an obscenely large search space. I can see scores that I'm happy with already but my stdout doesn't display which params led to those scores..

I've searched the docs: http://scikit-learn.org/stable/modules/generated/sklearn.grid_search.GridSearchCV.html

And there is a discussion from a couple years ago about adding a feature for parrallel search here: https://sourceforge.net/p/scikit-learn/mailman/message/31036457/

But nothing definitive. My search has been working for ~48hrs, so I don't want to loose what's been discovered, but I also don't want to continue.

Thanks!

shallow_water
  • 131
  • 2
  • 10

1 Answers1

3

welcome to SO!

To my understanding there isn't any intermediate variables that get returned off the grid_search function, only the resulting grid and their scores (see here for more information grid search.py).

So if you cancel it you might lose the work that's been done so far.

But a bit of advice, 48 hours is a long time (obviously this depends on the rows, columns and number of hyper parameters being tuned). You might want to start with a more broad grid search first and then refine your parameter search off that.

That will benefit you two ways:

  1. Run time might end up being much shorter (see caveats above) meaning you don't have to wait so long and risk losing results

  2. You might find that your model prediction score is only impacted by one or two hyper parameters, letting you keep the other searches more broad and focussing your efforts on the parameters that influence your prediction accuracy most.

Hopefully by the time I've written this response your grid search has completed!!

plumbus_bouquet
  • 443
  • 6
  • 7