I am trying to implement the convex optimization problem in the link:
http://cvxopt.org/examples/mlbook/mcsvm.html#equation-multiclass_svm
As I understand the last condition 1m means identity matrix. May I ask if the following code in CVX (matlab is fine)
E=zeros(NumClasses*TrainSample,NumClasses);
vecOnes=ones(L,1);
E(1:L,1)=vecOnes;
E(L+1:2*L,2)=vecOnes;
E(2*L+1:3*L,3)=vecOnes;
E(3*L+1:4*L,4)=vecOnes;
Q=TrainFeat'*TrainFeat;
gamma=.5
cvx_begin
variable U(NumClasses*TrainSample,NumClasses)
maximize(-1/2*(U(:,1)'*Q*U(:,1)+U(:,2)'*Q*U(:,2)+U(:,3)'*Q*U(:,3)+U(:,4)'*Q*U(:,4))+(E(:,1)'*U(:,1)+E(:,2)'*U(:,2)+E(:,3)'*U(:,3)+E(:,4)'*U(:,4)))
subject to
U-gamma*E<=0
U*eye(4)==0
cvx_end
In the above Q is kernel defined as X’X where X is the data matrix. Is the last condition Ueye(4)==0 necessary?
I shall truly appreciate few words form you.
Best Regards