How to express this objective funtion in CVX or TFOCS?


Dear all,

How to express the following objective function with CVX?

\min_{z>0} z*ln(\frac{1}{N}\sum_{k=1}^{N} \exp{(\frac{k}{z})}-\alpha)

It should be convex.
I also tried smooth_logsumexp in TFOCS and It always reports error in the “-” before \alpha.

Here \alpha is a negative constant.

Thank you in advance.

(Mark L. Stone) #2

I believe this is {concave,constant,convex} respectively for alpha {positive, zero, negative}.


Yes. Thank you for such a quick reply. Here alpha is negative. I should have stated here. Let me add it.

(Mark L. Stone) #4

I have removed the non-convex designation. I don’t see how to enter this into CVX. If someone else does, great, but I am not optimistic.


It may not be the problem of convexity since here the variable is z.
I tried smooth_logsumexp in TFOCS. It works well without the constant term. But when I added the constant term, it reported error in the symbol - or + before the constant term \alpha. I guess it may have something to do with the function handle function. But I don’t know how to use it correctly. Could you help me with it?

(Mark L. Stone) #6

Without the constant term, i.e., with alpha = 0, the objective function is just a constant.

I will have to defer to someone else for help with TFOCS. But I will re-classify the thread as TFOCS, and change its title, in order to gain attention of TFOCS experts.


Thank you so much. Yesterday, someone told me this could be done through exponential cone. Could you provide information regarding to exponential cone in CV

(Mark L. Stone) #8

I’m not saying it can’t be done with exponential cone, but I didn’t see how, else I would have told you. log_sum_exp does invoke the exponential cone, BTW.

Fro an example of explicit use of exponential cone construct in CVX, look at mcg’s first post in Solve optimization problems of exp function . However, any use in CVX of log, exp, entr, rel_entr, log_sum_exp will invoke the exponential cone “under the hood”, so the someone who told you might be referring to any of this. Anyhow, if the someone really does know how to input this problem into CVX, please have them or you post it here.


Thank you so much for your help and I will ask him in detail.