I want to minimize sum of multiple `y'*W*y*y'*b`

(depends on current sample’s W and b). This objective can be achieved in a for loop.

y is 5x1 variable vector, W is 5x5 given matrix and b is given constant.

The objective per sample is equal to `trace(W*Y)*y'*b`

where Y =`y*y'`

. Rewriting y as `c'*Y_vec`

where `Y_vec`

is vectorized version of `Y`

, and rewriting `trace(W*Y)`

as `z'*Y_vec`

.

Then objective is = `z'*Y_vec*c'*Y_vec`

or `Y_vec'*z*c'*Y_vec`

, which is = `trace(z'*c*YY)`

where YY = `Y_vec*Y_vec'`

.

This turns the variable space from 5x1 to 25x25. I do not want this, I want my variable space to be 5x5 just like a regular SDP problem would do.

y can be extraxted from Y as Y(some_indices). Then, trace(W*Y)*y’*b = `trace(W*Y)*Y(some_indices)'*b`

has 5x5 variable space of Y. However, this would produce disciplined convex programming error.

How can I solve this problem by optimizing 5x5 matrix?