I am looking for a package to help me solve some quadratic optimisation problems and I see there are at least half a dozen different packages. According to this page:
QP (Quadratic programming, 90C20): cplexAPI, kernlab, limSolve, LowRankQP, quadprog, Rcplex, Rmosek
Some of these (Rmosek and cplexAPI) depend on other proprietary packages, so I'm not interested in those.
What are the notable differences between the other QP packages?
Best Answer
- Cplex (cplexAPI, Rcplex): is not open source (but there is a yearly renewable free academic licence). It supports sparse matrices. Was my gotto wrapper for QP while I was using it. Beaware that the academic licence does not allow to use it on many cores (say through
mclapply()
). - ipop (the one in kernlab) is implemented in pure R. That makes it unnecessarily slow in big applications. Doesn't support sparse matrices.
- limSolve doesn't solve full fledged QP's, only those where the constraints are of type equality. Not all QP problems can be framed this way, but when then can, they have an explicit solution. Does not support sparse matrices.
- LowRankQP: this one in my experience is a good one (fast compared to the other open source ones). Does not support sparse matrices.
- quadprog: baseline implementation of the Goldfarb & Idnani Dual and Primal-Dual solver. Does not support sparse matrices but quiet fast for moderatly sized problems.
- Rmosek: never tried.
Edit.
Since I wrote this answer, a new package, ipoptr is now available on R-forge. This R-blogger post compares it performance on pure QP with quadprog. In short, ipoptr supports sparse matrix triplets and tends to be much faster than quadprod when the design matrices are sparse. When the design matrices are dense however, quadprog still appears to be significantly faster.
Similar Posts:
- Solved – What are the differences between various R quadratic programming solvers
- Solved – What are the differences between various R quadratic programming solvers
- Solved – How to get the correlation between two large (sparse) matrices
- Solved – Python – (SVM) Why is the Gram matrix not positive definite
- Solved – Non-negative coefficient restriction in stacked regression