Hi all,
I implemented multi-task lasso regression and it works well in CVX. Basically I’m regularizing 4 regression models together.
cvx_begin quiet
variable x(50,4)
minimize(square_pos(norm(A*x-Y)) + Lambda * norm(x,1)
cvx_end
I’ve added another regularization term which regularize 3th norm for each features across different regression model. in other word, if feature V is belong to specific group, its vector of coefficients across different regularized by 3th norm. I have a binary matrix called Group which indicate which feature coefficient vector(here the size of vector for every feature is 4 because we have 4 model) should regularized across different models. But when I run it, I get an error like this: "
Error using cvx/cat (line 102)
To RESHAPE the number of elements must not change.
Error in cvx/norms (line 89)
{ cat( 3, z, y( ones(nx,1), : ) ), cvx_accept_convex(x) } …
Error in cvx/norms (line 76)
y = cvx_subsasgn( y, tt, norms( xt, p
"
Here is my implementation. Would someone help me with this? It works pretty fine with L2 and L_infinity norm, but when I change it to 3 or other norms, I get the above error.
Would someone help me with this?
cvx_begin quiet
variable x(50,4)
minimize(square_pos(norm(Ax-Y)) + Lambda * norm(x,1) + OmegA * (sum(norms((x . Binding_matrix’)’,3)))
cvx_end