A metric learning problem using CVX

Hi Guys,

I am trying to solve a metric learning problem as shown in the image with CVX. I know how to formulate the cost function through trace operator. However, I am puzzled about the constraint which is a sum of two norms. Any help will be very much appreciated.

Best, Art

This executes without error:

x=rand(3,1); y=rand(3,1);
cvx_begin
variable A(3,3) semidefinite
sqrt(x'*A*x) + sqrt(y'*A*y)

ans =

cvx concave expression (scalar)

So sqrt(x'*A*x) + sqrt(y'*A*y) >= 1 is accepted by CVX. I’ll lleave the indexing you need to you.

1 Like

Hi Mark, I appreciate the reply. The sum is over a large number of x_i and x_j. Please let me try and I will get back to you if I could not solve the problem. Once again, I appreciate the prompt reply. Cheers, Art