Thread: Q9, SVM vs PLA
View Single Post
  #12  
Old 05-23-2013, 03:55 AM
Elroch Elroch is offline
Invited Guest
 
Join Date: Mar 2013
Posts: 143
Default Re: Q9, SVM vs PLA

Quote:
Originally Posted by catherine View Post
@jlaurentum:
These are the parameters I fed to ipop:
Code:
H = sweep(XIn[,2:3],MARGIN=1,yIn, '*')
c = matrix(rep(-1,n))
A = t(yIn)
b = 0
l = matrix(rep(0,n))
u = matrix(rep(1e7,n))
r = 0
sv = ipop(c,H,A,b,l,u,r)
I'm not sure why but I had to tweak u to get a 0 Ein across the board, ie for all 1,000 iterations. I have to admit that the technicalities of quadratic programming go a tad over my head :/
I just came to this forum to discuss this same matter. My last post was confusing, probably because I was a bit confused!

The u parameter is just a vector of upper bounds for inequalities, but our problem only has lower bounds. I wanted to use a vector of Infs, but ipop didn't like that, so I just played around to find a value for c that would work. For some reason I found extremely large values gave errors, but large ones (like the one you used worked fine). I don't know why either. As you probably realised, all you need to check is that none of the alphas attains the upper bound you use. If that is the case, the upper bounds have had no effect.

How did you arrive at your choice of H?
Reply With Quote