0
votes

My problem is minimizing the difference between the two (let's call them f(x) and g(x)) functions. I do not have analytical expressions for the functions, however, I do have values (outputs) of f(x) and g(x), as well as x.

Since we can look at functions as infinite-dimensional vectors, I was wondering how to solve this optimization problem in CVXPY.

Thank you in advance!

1
That is not possible with cvxpy.ErlingMOSEK

1 Answers

0
votes

If you want to find the x that minimizes the difference between the two vectors you just need to do

np.argmin(f(x)-g(x))

If you are looking for a global minimum you will not only need an expression but your problem should also be convex. If you are not familiar with this you can read this book: https://web.stanford.edu/~boyd/cvxbook/bv_cvxbook.pdf