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.

  • $\begingroup$ 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. $\endgroup$ – Mark L. Stone Feb 4 '17 at 18:43
  • $\begingroup$ 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. $\endgroup$ – 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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.