Subsections


minimise.grid_zoom

Image rosenbrock Image zoom-in

Synopsis

Activate the zooming grid search by setting the zoom level.

Defaults

minimise.grid_zoom(level=0)

Keyword arguments

level: The zooming grid search level. This can be any number, positive or negative.

Description

The optimisation of a mathematical model normally consists of two parts - a coarse grid search to find an initial set of parameter values followed by the use of a high precision optimisation algorithm to exactly find the local or global solution. But in certain situations, for example where a parallelised grid search is advantageous, a finer grid may be desired. The zooming grid search provides a more efficient alternative to simply increasing the number of increments used in the initial grid search. Note that in most situations, standard optimisation algorithms will be by far computationally less expensive.

The zooming grid search can be activated via this user function. After setting the desired zoom level, the original grid search user function should be called again. The zoom level is used to decrease the total area of the grid search. The grid width for each dimension of the parameter space will be divided by 2**zoom_level. So a level of 1 will halve all dimensions, a level of 2 will quarter the widths, a level of 3 will be an eighth of the widths, etc.

The zooming algorithm proceeds as follows. The new zoomed grid will be centred at the current parameter values. However if the new grid is outside of the bounds of the original grid, the entire grid will be translated so that it lies entirely within the original bounds. This is to avoid grid points lying within undefined regions of the space. An exception is when the zoom factor is negative, hence the new grid will be larger than the original.

An example of using the zooming grid search is to first perform a standard initial grid search, then set the zoom level to 1 and perform a second grid search. Continue for zoom levels 2, 3, etc. until the desired fineness is obtained. Note that convergence is not guaranteed - as the zoom level is increased to infinity, the parameter values do not necessarily converge to the local minimum. Therefore performing standard optimisation is recommended after completing a zooming grid search.


The relax user manual (PDF), created 2016-10-28.