Global Optimization Toolbox

Optimization of Stochastic Objective Function

This example shows how to find a minimum of a stochastic objective function using PATTERNSEARCH function in the Global Optimization Toolbox. We also show why the Optimization Toolbox™ functions are not suitable for this kind of problems. A simple 2-dimensional optimization problem is selected for this example to help visualize the objective function.

The objective function is smooth (twice continuously differentiable). We will solve the optimization problem using FMINCON function from the Optimization Toolbox. FMINCON finds a constrained minimum of a function of several variables. This function has a unique minimum at the point x* = (-5.0,-5) where it has a function value f(x*) = -250.

The objective function is stochastic and not smooth. FMINCON is a general constrained optimization solver which finds a local minima using first derivative of the objective function. If derivative of the objective function is not provided, FMINCON uses finite difference to approximate first derivative of the objective function. In this example, the objective function have some random noise in it. The derivatives hence could be highly unreliable. FMINCON can potentially stop at a point which is not a minimum. This may happen because the optimal conditions seems to be satisfied at the final point because of noise or it could not make any progress.

We will now use PATTERNSEARCH from the Global Optimization Toolbox. Pattern search optimization techniques are a class of direct search methods for optimization. A pattern search algorithm does not require any derivative information of the objective function to find an optimal point.

Pattern search algorithm is not affected by random noise in the objective functions. Pattern search requires only function value and not the derivatives, hence noise (of some uniform kind) may not affect it. However, pattern search requires more function evaluation to find the true minimum than derivative based algorithms, a cost for not using the derivatives.