Search code examples
pythonscikit-learnkerashyperparameterstalos

Hyper-parameter Optimization with keras models: GridSearchCV or talos?


I want to tune hyper-parameters on keras models and I was exploring the alternatives I had at hand. The first and most obvious one was to use scikit-learn wrappers as shown here (https://keras.io/scikit-learn-api/) thereby being able to use all the faboulous things in the scikit-learn worflow but I also came across this package here (https://github.com/autonomio/talos) that seems very promising and most likely offers a speed boost.

if anyone used them both, could someone point me towards the better solution (flexibility, speed, features)? The sklearn workflow with pipeline and custom estimators provides a world of flexibility but talos seems more directly geared towards keras specifically therefore it must yield some advantages (I guess they would not have made a new standalone package otherwise) which I am not able to see (some benefits are highlighted here https://github.com/autonomio/talos/blob/master/docs/roadmap.rst but such thigns seem to be adequately covered within the scikit-learn framework)

any insights?


Solution

  • Personal opinions:

    • train/valid/test split is a better choice than cross validation for deep learning. (The cost of k training is too high)

    • random search is a good way to start exploring the hyper-parameters, so it's not really hard to code this yourself but yes talos or hyperas (which is quite famous) could be helpfull.