Search code examples
mathematical-optimization

Finding the local minima of a convex function but expression of the function is unknown


I'm developing an application that can automatically calibrate lidar. The lidar has four parameters a, b, c, d, each with a range from -5.0 to 5.0 inclusive and step size 0.1. The lidar can output a value called error.In general, f(a, b, c, d) = error. The lower the value of error the better the lidar is calibrated. The program is supposed to find a, b, c, d such that error can be minimized as much as possible. I don't know the expression of the function so I cannot apply gradient descent function. However, the function is supposed to be convex. I can approximate the gradient by finite differences but getting the output from lidar is expensive; There are many gradient free optimizations online but which algorithm should I choose. Any ideas?


Solution

  • You could start with the Nelder-Mead method. It builds a simplex from previous function evaluation points and reflects them to dismiss the worst point and select a new trial point.

    To reduce the number of function evaluations, you could interpolate a 4D quadratic function from previous function evaluations. Then take the minimum of this interpolated function as next estimate. Repeat the process, until convergence is reached or search time exhausted.

    Intersperse random restarts in case of slow convergence.

    You could either delimit the variables to their allowed ranges or penalize variables violating the limits.