Help with rank exception (example code provided)

84 views
Skip to first unread message

jah

unread,
Feb 7, 2014, 12:14:50 AM2/7/14
to cvx...@googlegroups.com
I'm trying to solve a convex optimization problem, and so I've prepared a self-contained and simple demonstration of the problem I am running into here:


When I run the program, I get:

   ValueError: Rank(A) < p or Rank([H(x); A; Df(x); G]) < n

In this problem, my optimization variable has dimension n = 8.
The matrix A has shape (p,n) = (6,8) and I've verified that it has the correct rank: p = 6.
Then I tried:

   zz = np.vstack([ H, A, Df, G ])   # where these are taken from the code
   np.linalg.matrix_rank(zz)  # returns 8, as desired.

Assuming I've understood the error correctly, I don't understand why I'm getting the above error.  This problem is known to be convex and it seems like my matrices have the proper ranks.  Any suggestions are appreciated.  Happy to chat off-list too.


jah

unread,
Feb 3, 2015, 3:09:53 AM2/3/15
to cvx...@googlegroups.com
I was wondering if anyone could take a second look at this. I'm still interested in solving this problem with cvxopt, but I'm not understanding why I'm getting the rank exception. I can verify on the fly that the matrices have the proper rank. The code in cvxopt that generates the exception is:


        try: f3 = kktsolver(x, z[:mnl], W)
        except ArithmeticError: 
            singular_kkt_matrix = False
            if iters == 0:
                raise ValueError("Rank(A) < p or "\
                    "Rank([H(x); A; Df(x); G]) < n")

Is there another reason why I could be getting this exception?
Reply all
Reply to author
Forward
0 new messages