LFD Book Forum

LFD Book Forum (http://book.caltech.edu/bookforum/index.php)
-   Homework 7 (http://book.caltech.edu/bookforum/forumdisplay.php?f=136)
-   -   What Quadratic Programming Package? (http://book.caltech.edu/bookforum/showthread.php?t=513)

lucag 05-18-2012 08:00 PM

What Quadratic Programming Package?
 
Hello everyone,

what quadratic programming package will you be using for HW#7?

I looked it up a bit online and found a few, but I am curious to hear from the class.
My programming language of choice is Matlab/Octave (I know Python and C++ too but I am more comfortable with Matlab/Octave), for which I found http://www.mat.univie.ac.at/~neum/software/minq/ ... but I am a bit reticent to use a package I've never tried before.

Thanks!

kkkkk 05-18-2012 10:40 PM

Re: What Quadratic Programming Package?
 
I am using python and it seems that cvxopt is the commonly used free library.

IamMrBB 05-19-2012 04:42 AM

Re: What Quadratic Programming Package?
 
Quote:

Originally Posted by kkkkk (Post 2206)
I am using python and it seems that cvxopt is the commonly used free library.

that's the one i used as well

marcello 05-19-2012 06:46 AM

Re: What Quadratic Programming Package?
 
Is there one such lib that can work on Windows?
Thanks

dudefromdayton 05-19-2012 07:43 AM

Re: What Quadratic Programming Package?
 
In this thread, I describe one alternative for Mathematica users, and the ups and downs of that approach.

lucag 05-19-2012 11:52 AM

Re: What Quadratic Programming Package?
 
Thanks for the input ... I found the CVX library for Matlab and I will (try to) use that.
@Marcello I don't think any of those libraries are system specific, i.e., they can be used on a Mac as well as on Windows, or Linux, or BSD, or ...

mathprof 05-19-2012 01:39 PM

Re: What Quadratic Programming Package?
 
I also used Python with cvxopt. It seemed to work fine.

marcello 05-19-2012 03:20 PM

Re: What Quadratic Programming Package?
 
Found Win64 installer here: http://www.lfd.uci.edu/~gohlke/pythonlibs/
(great Python resource)

Whitout the installer, it's a nightmare :S

jbaker 05-20-2012 12:18 AM

Re: What Quadratic Programming Package?
 
Anybody tried this in R? The solve.QP function in the quadprog library sounds very promising, but it complains about the first matrix not being positive definite (unless I set factorized=T, which doesn't sound right -- Dmat here is the same as what's called Q on the lecture slide, correct?).



solve.QP package:quadprog R Documentation

Solve a Quadratic Programming Problem

Description:

This routine implements the dual method of Goldfarb and Idnani
(1982, 1983) for solving quadratic programming problems of the
form min(-d^T b + 1/2 b^T D b) with the constraints A^T b >= b_0.

Usage:

solve.QP(Dmat, dvec, Amat, bvec, meq=0, factorized=FALSE)

Arguments:

Dmat: matrix appearing in the quadratic function to be minimized.

dvec: vector appearing in the quadratic function to be minimized.

Amat: matrix defining the constraints under which we want to
minimize the quadratic function.

bvec: vector holding the values of b_0 (defaults to zero).

meq: the first ‘meq’ constraints are treated as equality
constraints, all further as inequality constraints (defaults
to 0).

factorized: logical flag: if ‘TRUE’, then we are passing R^(-1) (where
D = R^T R) instead of the matrix D in the argument ‘Dmat’.

forecaster 05-20-2012 03:44 AM

Re: What Quadratic Programming Package?
 
I had the same problem with solve.QP.

Try ipop (kernlab package) and it will work.


All times are GMT -7. The time now is 02:03 PM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
The contents of this forum are to be used ONLY by readers of the Learning From Data book by Yaser S. Abu-Mostafa, Malik Magdon-Ismail, and Hsuan-Tien Lin, and participants in the Learning From Data MOOC by Yaser S. Abu-Mostafa. No part of these contents is to be communicated or made accessible to ANY other person or entity.