tag:blogger.com,1999:blog-593563533834706486.post5276456115208157113..comments2024-03-28T10:35:10.453-04:00Comments on Yet Another Math Programming Consultant: CVXPY large memory allocationErwin Kalvelagenhttp://www.blogger.com/profile/09496091402502236997noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-593563533834706486.post-73441800163987049622020-01-09T15:00:36.326-05:002020-01-09T15:00:36.326-05:00Thanks. That is an interesting experiment. Thanks. That is an interesting experiment. Erwin Kalvelagenhttps://www.blogger.com/profile/09496091402502236997noreply@blogger.comtag:blogger.com,1999:blog-593563533834706486.post-2697958488876883962020-01-09T14:10:43.880-05:002020-01-09T14:10:43.880-05:00Interestingly, the problem gets solved if you call...Interestingly, the problem gets solved if you call ECOS directly (ecos requires G and h such that h-Gx in K, dim_q is the dimension of the second order cone, and the first element of h-Gx is norm bounded by the other elements (typically it is the last element)):<br /><br /> import ecos<br /> c = np.zeros((M+1,))<br /> c[0] = 1<br /> G = np.zeros((N+1,M+1))<br /> G[0,0] = -1<br /> G[1:, 1:] = X<br /> G = sp.sparse.csc_matrix(G)<br /> h = np.pad(y.flatten(), (1, 0), 'constant')<br /> dims = {'q':[N+1]}<br /> ecos.solve(c,G,h,dims)Anonhttp://yetanothermathprogrammingconsultant.blogspot.comnoreply@blogger.com