Sitemap
TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Follow publication

Are You Still Using Grid Search for Hyperparameters Optimization?

10 min readJun 24, 2021

--

Photo by Miikka on Unplash.

1. Base Strategies:

Grid Layouts. Image by Yoshua Bengio et al. [2].

2. Visualizing the problem

Accuracy score vs. hyperparameters choices. Image by the author.
dot 1: {"learning_rate": 0.001, "layers": 5, "optimizer": "Adam"}
dot 2: {"learning_rate": 0.01, "layers": 3, "optimizer": "Adagrad"}
dot 3: {"learning_rate": 1, "layers": 6, "optimizer": "SGD"}
dot 4: {"learning_rate": 0.001, "layers": 8, "optimizer": "RMSprop"}
dot 5: {"learning_rate": 0.1, "layers": 20, "optimizer": "SGD"}

3. The informative way

Iterative optimization process. Image by the author.

4. Genetic Algorithms (GA) Approach

Generation 0. Image by the author.
Crossover operation. Image by the author.
Child 1: {"learning_rate": 0.015, "layers": 4, "optimizer": "Adam"}
Child 2: {"learning_rate": 0.4, "layers": 6, "optimizer": "SGD"}
Mutant child. Image by the author.
Random change in one parameter. Image by the author.
Generation 1. Image by the author.
The metric improvement over generations. Image by the author.
Sampled distribution of hyperparameters. Image by the author.

Introducing Sklearn-genetic-opt

Sklearn-genetic-opt general steps. Image by the author.
Mlflow logging. Image by the author.

References

--

--

TDS Archive
TDS Archive

Published in TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Rodrigo Arenas
Rodrigo Arenas

Written by Rodrigo Arenas

Data Scientist and open-source contributor working on machine learning, and optimization; for all my projects, check: https://rodrigo-arenas.github.io/portfolio

Responses (2)