Quote:
Originally Posted by kurts
Here's the setup that I used for the qp function
Code:
n = length(X(:,1)); % How many points
d = length(X(1,:)); % Dimensionality of X
H = zeros(n,n);
L = ones(n,1);
L = 1.*L; % Linear term is tall vector of 1
lb = zeros(n,1); % Lower bound on alpha is tall vector of 0
A = Y'; % Linear coefficient (A)(alpha) + blin = 0
blin = 0; %
for i = 1:n;
for j = 1:n;
H(i,j) = Y(i)*Y(j)*X(j,:)*X(i,:)';
end;
end;
[alpha, obj, info, lambda] = qp([],H,L,A,blin,lb,[]);

I used pretty much the same setup, but with alpha0 = 1 to start with.
However, did you check the
info.info return code? I always get a 3 even if I increase the number of iterations from the default of 200 to 1000 (
options.MaxIter = 1000). Code 3 just means that maximum number of iterations reached. I can see pretty decent support vectors though, so I'm hoping that's OK.