How to minimize sqrt(X'*X) by CVX?
I want to minimize $f(x) = trace(\sqrt{X^{T}X}A)$, where X is an matrix variable of dimension d x d, and A is a known matrix. I tried the following code:
cvx_begin
variable x(d,d)
minimize(trace(sqrt(sum_square_abs(x))*A))
subject to
x(sp_index) == M(sp_index)
cvx_end
However, there are still errors as following:
Error using cvx/sqrt (line 61)
Disciplined convex programming error:
Illegal operation: sqrt( {convex} ).
Error in Test_CVX_Iterative_Optimal (line 34)
minimize(trace(sqrt(sum_square_abs(x))*A))
So how should I solve this problem by CVX? Looking forward to your reply! I also asked the same question in the CVX forum http://ask.cvxr.com/question/2894 but haven't got it solved yet. Wish anyone here is able to offer help!
Update: Thanks to @DavidKetcheson , I should use sqrtm() rather than sqrt. 563
To represent $trace(\sqrt{X^TX})$ I should use trace_sqrtm(sum_square_abs(x)). However, I need to represent $trace(\sqrt{X^TX}A)$, and I don't know how to represent it by a valid CVX expression.
I tried
minimize(trace(sqrtm(sum_square_abs(x))*A))
to replace sqrt in the original, but I got the following error
Undefined function 'schur' for input arguments of type 'cvx'.
Error in sqrtm (line 32)
[Q, T] = schur(A,'complex'); % T is complex Schur form.
Error in Test_WeightNucNorm (line 35)
minimize(trace(sqrtm(sum_square_abs(x))*A))
I understand now that sqrtm() function is not implemented in CVX, so I have the error ' Undefined function 'schur' for input arguments of type 'cvx'.'. But my problem is still not solved.
I think I should use:
minimize(trace_sqrtm(sum_square_abs(x))*A)
But I still get error:
Error using cvx/trace_sqrtm (line 9)
Input must be affine.
Error in Test_WeightNucNorm (line 40)
minimize(trace_sqrtm(sum_square_abs(x))*A)
---------- Important update Thanks to @k20 , I made a mistake!! This is not the weighted nuclear norm of matrix X, but the weighted trace of $\sqrt{X^TX}$!! Now my problem becomes that:how to represent the weighted nuclear norm of a matrix $X$, where $X$ is CVX variable, A is a diagonal weight matrix. I tried to find a CVX function which give me all the singular values of variable $X$, but I haven't found such a function. 563