# Why would sequential quadratic programming fail to find global minimum?

I have a data set. A matrix $$X$$, $$1300 \times 20$$ and output vector $$\mathbf{y} \in \Bbb R^{20}$$ $$\mathbf{y} = \begin{bmatrix} 100\\100\\\vdots\\100\end{bmatrix}$$ I am trying to run OLS on this data with $$\boldsymbol{\beta} \geq \mathbf{0}$$ and additional inequality constraints.

I first attempted to solve without the inequality constraints with a Python function that uses coordinate descent. This converged and this test proved I could find a global minimum. But the code doesn't accept constraints beyond $$\boldsymbol{\beta} \geq \mathbf{0}$$, so it's not enough for my purposes.

I then tried another Python function that uses sequential quadratic programming (SQP), which didn't converge to the global minimum. It should produce the same result since it's the same problem, but it didn't. You can see the details of my code here:

how to stop fmin_slqsp from converging to local minimum?

I determined it's likely the SQP method reached a local minimum whereas the coordinate descent method didn't.

Why would sequential quadratic programming fail to find global minimum?

• Why don't you use CVXPY? – Rodrigo de Azevedo Mar 8 at 18:03
• @RodrigodeAzevedo That looks promising. Do you have any recommendations for which methods specifically I should look at that would be useful for my case? – Stan Shunpike Mar 8 at 18:08
• That is the whole point of CVXPY. You don't worry about methods. You just write up your optimization problem and CVXPY takes it from there. If the problem is not convex, CVXPY will complain. Good for prototyping. – Rodrigo de Azevedo Mar 8 at 18:13
• It works much better but the solution is still off by a bit. It's 1444.482627745685. – Stan Shunpike Mar 8 at 22:01
• @RodrigodeAzevedo Yes, this worked. This solved the issue. Fantastic, thank you so much for your help. – Stan Shunpike Mar 9 at 1:18