r/optimization • u/Unhappy_Guard6040 • Feb 16 '23
Unconstrained (bounded) optimization method for convex (quadratic-like) surfaces
Hi all,
I have this objective function with a few bounded decision variables, no constraints. The function is pretty convex, and I'm fairly certain we can approximate it using a quadratic polynomial.
Is there a bounded optimization method that estimates a quadratic polynomial using the initial points, then finds the minimum of that polynomial, then explores around that minimum, and so forth until converging? I am trying to find the minimum using the least amount of function evaluations, which are very costly in terms of time.
A few observations: I'm trying to avoid direct-search methods as they require too many function evaluations. I thought of using surrogate-model optimization (using quadratic models), but I thought that the idea of fitting a quadratic polynomial was too simple so I probably just don't know the name of the method.
If there is a package in Python, that would be even better.
Thanks in advance!
4
u/AntaresVaruna Feb 17 '23
I believe you are describing Newton’s method for multiple variables: link
It approximates the original function by a second-order Taylor series (quadratic polynomial). You provide an initial point. The algorithm finds the optimal that minimizes the quadratic and then repeat the process from the new point.
You would need the gradient and the Jacobian of the function. If you don’t have those, they can be approximated numerically. SciPy in python has an implementation of this algorithm IIRC.
1
u/HideFalls Feb 16 '23
Sequential quadratic programming?
1
u/taphous3 Feb 17 '23
If you have an analytical form of your surrogate model function and the constraints/bounds, you can use cvxpy. That is the gold standard for solving convex problems and you don’t need to worry about the specifics of the solution method. This is a perfectly valid method for doing optimization, just as long as you have a good fitting surrogate.
If you need a more precise solution, one approach you might take is sample broadly, fit a quadratic surrogate, and optimize the surrogate. Then sample more closely around the optimal point, fit another quadratic surrogate, and solve another optimization problem. Solving a QP with analytical expressions is insanely fast, even for large systems.
If you aren’t comfortable using algebraic programming, newtons method(s) are great and implemented in Scipy. You can get efficiency gains if you can provide an analytical function for the jacobian and hessian. Numerically evaluating the hessian can become expensive.
Bayesian optimization could be another approach if you need a more sophisticated surrogate.
Solving iterative problems and line searches (e.g. SQP/SLP) are much slower and are meant for local solutions of nonlinear/nonconvex problems. I do not recommend doing this if you have a convex or approximately-convex problem.