View Single Post
#23
 Yellin Member Join Date: Apr 2012 Posts: 26 Re: What Quadratic Programming Package?

The matrix D (called Q in the lecture) is such that for any b (called alpha in the lecture) b^T D b is w^T w, which cannot be negative. But with enough x_n vectors the x_n will surely be linearly dependent, so there are possible b such that w will be zero. D is therefore non-negative, but is certainly not positive definite. I think the statement in the quadprod code which causes the error is in dpofa, which checks that something is positive before taking the square root. Maybe it would work to modify the dpofa source so that where it's about to take the square root it checks that it's not negative, to within roundoff errors, and if the quantity is almost zero, replace its square root with something very small and positive.

I tried the modification of dpofa, and it gave strange results, so I undid the change and instead forced D to be positive definite by adding a small number to each of the diagonal elements. But even though D is now positive definite, the program returns complaining that it isn't.