Perspective function

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.
I would appreciate your help.

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.


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?

@jmiao I believe this can be done using CVXQUAD. , 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.