Skip to content

Instantly share code, notes, and snippets.

@badbye
Created December 22, 2013 16:06
Show Gist options
  • Save badbye/8084694 to your computer and use it in GitHub Desktop.
Save badbye/8084694 to your computer and use it in GitHub Desktop.
while stop
if all(sign(w*X') == Y)
break
end
for i=1:1:m
G=w*X';
if (Y(i)~=sign(G(i)))
w=w+Y(i)'*X(i,:);
end;
end;
t=t+1;
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment