I’m trying to optimize a function using CVX . My goal is to convexify a non-convex function by adding a strongly convex regularization . Here’s what I’m working with:
I understand that f_nonconvex is non-convex—it comes from a logistic-type expression—and the regularizer g(x) is strongly convex. I use a large enough lambda, hoping the sum becomes convex overall. But CVX still raises a DCP error.
Is there any workaround or recommendation on how to formulate this properly in CVX?
First of all, you shouldn’t just hope your optimization problem is convex, you must prove it. Even if you do, it’s not necessarily the case that it can be expressed using CVX"s rules.
Even if you accomplished that, it may be that the needed value of lambda depends on the input data, sample. And would the solution of this regularized problem with a giant value of lambda be meaningful relative to your original purpose in trying to solve this optimization problem?
Thanks for your response. I verified that the function
f(x) is convex — the regularizer ( g(x) ) is strongly convex and dominates the nonconvexity in f_nonconvex (x), so the sum is convex overall.
However, CVX still throws a DCP error when I try to solve it.
Do you think there’s a way to rewrite the problem — maybe using a change of variables or a different formulation — to make it DCP-compliant? I’d really appreciate any suggestions or guidance.