Has there been any update on solving this issues? I am also running into something similar. My S continuously grows until it reaches nan.
On Friday, January 18, 2013 2:55:41 PM UTC-8, Ely Spears wrote:I am also seeing this error. For me, the entries don't become negative but they can become a NaN value. I see them increasing dramatically as the number of iterations grows, and for a 1000x1000 problem, when the iteration hits around 50, that's when I see the value error. I added the "abs" trick just to be sure, and I do still see the ValueError.
I am using solvers.qp for the solution. I have not tried formulating the problem as a second-order cone problem though. I don’t think that is something I really want to do as I am not familiar with that process and I do not know what issues that will cause by deviating from the papers process. When I wrote this in MatLab I used the quadprog function to solve this problem and did not seem to run into any trouble.
You seem to have formed the problem correctly assuming that b = [b1,b2, bn] includes the delta (inverse of the conditional number of G) * Euclidian norm of G, although you might have missed the part where I multiply the constraints of the problem to match the form that CVXOPT accepts.
CVXOPT only accepts the constraints in the form Gx <= h, which is not the form that the paper takes. Instead it is Gx >= h.
The above constraint is of that form but the signs are flipped. The inequality is multiplied by -1 to achieve the desired form -Gx <= -h which is equal to Gx >= h, as shown in the CVX tutorial from: http://courses.csail.mit.edu/6.867/wiki/images/a/a7/Qp-cvxopt.pdf
I understand you concern about the rows being shared but doesn’t the multiplication by -1 flip your sign, making the inequalities feasible?
I'm not quite sure that I follow your reformulation of the problem. Are you solving the problem as a QP with solvers.qp? Have you tried formulating the problem as a second-order cone program and solving it using solvers.conelp? I don't know if I understand the problem that you are trying to solve correctly. It seems that the problem in the paper that you refer to can be expressed as.
minimize ||c||_2
subject to
B*c1 - Fl*c2 >= b1
-B*c1 + Fu*c2 >= b2
where c =[c1;c2] and B, Fl, and Fu are matrices. Equivalently, the constraints can be expressed as
b1 + Fl*c2 <= B*c1 <= Fu*c2 - b2
Notice that if Fu and Fl share a row (this seems to be the case in your example), then you have an inequality of the form
pos. const. + r' *c2 <= bi * c1 <= r'*c2 - pos. const.
where r' is the common row. Notice that the lower bound is larger than the upper bound, so that the set of inequalities is infeasible.
Am I missing something?
b1 + Fl*c2 <= B*c1 <=
I understand you objection to the example dataset that I posted. I went back the problem and code and I’m pretty sure that in its current form the inequalities are correct. I’ll post an example dataset if you want me to later.
I implemented a try, catch statement around the quadratic problem and instead of crashing I would just ignore the error and move to my next iteration. However, I still receive the error Terminated (singular KKT matrix), which I believe is produced when there is no solution to the set of basis functions used to solve the problem. Eventually if there is a solution it will converge to a feasible set of coefficients that product a rational function that fits the input data within the specified error bounds. If you believe this is not a reasonable explanation let me know. In any case I saw your suggestion as well as read in numerous places that the SOCP solver is more robust than the QP solver and tried to reformulate the problem. From what I’ve read, LPs, QCQPs, and QPs are special cases of SOCPs. However, inputting reformulations I’ve see into the conelq or socp solver does not seem straight forward. I’ve explained in my attached PDF, how I tried to reformulate the QP as an SOCP and then input it into CVXOPT.
cvxopt\coneprog.py", line 522, in conelp raise TypeError("'h' must be a 'd' matrix of size (%d,1)" %cdim) TypeError: 'h' must be a 'd' matrix of size (4,1)