# Perspective function

#1

Hi,
During the implementation of a perspective function in CVX I got an error. The function is x log(1+ y/x) which is concave.
I think it might be because of the DCP ruleset, but then I am wondering how can I add this function to CVX.
Thanks

Formation log(1+x/y) could used in cvx expressed like following?
Perspective of log det function, and CVX formulations of related log det problems using Quantum Relative Entropy from CVXQUAD
The optimization of shannon formula
How to express a function satisfies DCP?
(Michael C. Grant) #2

How about -rel_entr( x, x + y )? After all,
$$x\log (1+y/x) = x\log((x+y)/x) = - x \log (x/(x+y)) = - f_{\text{rel_entr}}(x,x+y)$$
Please remember that support for logarithms, exponentials, and entropy functions relies on the experimental successive approximation system in CVX.

(Miao Jiang) #3

Is there anyway to implement the perspective function of log det function (x\log|I+\frac Y x|, x \geq 0,Y \in S^+) in cvx?

(Mark L. Stone) #4

@jmiao I believe this can be done using CVXQUAD.https://github.com/hfawzi/cvxquad/9 , which supports quantum_rel_entr(X,Y) defined as trace(X*(logm(X)-logm(Y))) .

-quantum_rel_entr(x*eye(n), x*eye(n) + Y) = x*log(det(eye(n) + Y/x)) , which is the matrix (quantum) generalization of @mcg’s scalar formula above.

Full disclosure: I have never used CVXQUAD. @awinick, who tried it, wrote in Adding Quantum Relative Entropy to CVX “I found that both the run time and memory usage meant that I could only consider trivial problems of interest.” But perhaps your problems of interest, if you’re still interested a year later, are smaller than his.

Update: I’ve now tried some optimization with quantum_rel_entrunder CVX 2.1 . As matrix dimension increases, it can take a long time to process even an expression having qunatum_rel_entr, let alone the solver solution time. And you can easily run out of memory.

I encountered an error in kron which I have not tried to diagnose when using it under CVX 3.0beta.