Implementation of a concave function


(OS) #1

HI all,
I’m trying to optimize the function: - \sum_x x\log\frac{x}{\sum_{x'\in S(x)} x}, where S(x) is a subset of elements from the variables vector, \underline{x}, determined by the coordinate x.

It is not difficult to show that this function is concave (log-sum inequality), but I’m new to cvx and would appreciate your support.

Thanks a lot!!


(Mark L. Stone) #2

If S(x) is a function only of which term (coordinate position) in the outer sum is being evaluated, then I think you can use rel_entr, with reL_entr argument X being x and rel_entr argument Y being the sum of the x components over S(X). In such case, perhaps you have a separately defined S for each coordinate of x (term in the outer sum).

If S(x) depends on the value of x, i.e., which components of x are selected for the inner sum depends on the value of x, then I believe your function would be non-concave.


(OS) #3

S(x) is a coordinate-dependent function so your suggestion works perfectly for me. Thanks Mark!