# Why would Quadratic Program in SVM not work for very large or very small lambda?

I am wondering why Quadratic Program in SVM gives inversion error when I take $\lambda$ to be really small. $\lambda$ is really only changing the upper bound for the argument so I do not see how an inversion error would arise.

I used ipop in kernlab and solve.QP in quadprog.

If anything, a smaller $\lambda$ should make the problem easier because it is equivalent to making the range of the argument smaller.

• What is the exact (error) message you got? Perhaps if you show what you did (with exact calling sequences) and the output, your chances of getting a useful answer would increase. – Mark L. Stone Feb 4 '17 at 18:43
• I don't use an English system. But when I use $\lambda=1$ for ipop, I get something like, Error in solve.default(AP, c(c.x, c.y)) system is numerically singular and when I use solve.QP, the solution is a vector NaN. – ztyh Feb 4 '17 at 20:09

There is a bug in quadprog with regards to the handling of very small numbers. I believe this explains exactly why your example fails, although solving the problem should be easier.

This is explained in more details at https://chasethedevil.github.io/post/quadprog-nans/

and there is a pull request for it at https://github.com/cran/quadprog/pull/1