Using Hyperopt in Python to minimize any function

Spread the word!

Motivation

If you have any kind of function returning real values, it could not be possible to apply classical derivative approaches to search for global minima (or maxima). For this kind of problems, there are different solutions and implementation.

Unlike random automated parameter tuning approaches, Bayesian Optimisation methods aim to choose next hyperparameter values according to past good models.

Bayesian optimization is a sequential design strategy for global optimization of black-box functions that doesn’t require derivatives. (Wikipedia)

Hyperopt is a Python implementation using the Bayesian optimization approach.

Examples with single and multivariable functions

A more readable and complete explanation (with plots!) of the Python code is available in this html page, which can also be found in my Github repository as Jupyter Notebook and PDF.

A minimal python code is shown in the following snippet, but I suggest you to check the above mentioned html page first.

 

Be the first to comment

Leave a Reply

Your email address will not be published.


*