LFD Book Forum  

Go Back   LFD Book Forum > Course Discussions > Online LFD course > Homework 7

Reply
 
Thread Tools Display Modes
  #1  
Old 05-18-2012, 07:00 PM
lucag lucag is offline
Member
 
Join Date: Apr 2012
Posts: 44
Default 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!
Reply With Quote
  #2  
Old 05-18-2012, 09:40 PM
kkkkk kkkkk is offline
Invited Guest
 
Join Date: Mar 2012
Posts: 71
Default Re: What Quadratic Programming Package?

I am using python and it seems that cvxopt is the commonly used free library.
Reply With Quote
  #3  
Old 05-19-2012, 03:42 AM
IamMrBB IamMrBB is offline
Invited Guest
 
Join Date: Apr 2012
Posts: 107
Default Re: What Quadratic Programming Package?

Quote:
Originally Posted by kkkkk View Post
I am using python and it seems that cvxopt is the commonly used free library.
that's the one i used as well
Reply With Quote
  #4  
Old 05-19-2012, 05:46 AM
marcello marcello is offline
Member
 
Join Date: Apr 2012
Posts: 35
Default Re: What Quadratic Programming Package?

Is there one such lib that can work on Windows?
Thanks
Reply With Quote
  #5  
Old 05-19-2012, 06:43 AM
dudefromdayton dudefromdayton is offline
Invited Guest
 
Join Date: Apr 2012
Posts: 140
Default Re: What Quadratic Programming Package?

In this thread, I describe one alternative for Mathematica users, and the ups and downs of that approach.
Reply With Quote
  #6  
Old 05-19-2012, 10:52 AM
lucag lucag is offline
Member
 
Join Date: Apr 2012
Posts: 44
Default 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 ...
Reply With Quote
  #7  
Old 05-19-2012, 12:39 PM
mathprof mathprof is offline
Invited Guest
 
Join Date: Apr 2012
Location: Bakersfield, California
Posts: 36
Default Re: What Quadratic Programming Package?

I also used Python with cvxopt. It seemed to work fine.
Reply With Quote
  #8  
Old 05-19-2012, 02:20 PM
marcello marcello is offline
Member
 
Join Date: Apr 2012
Posts: 35
Default 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
Reply With Quote
  #9  
Old 05-19-2012, 11:18 PM
jbaker jbaker is offline
Member
 
Join Date: Apr 2012
Posts: 11
Default 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’.
Reply With Quote
  #10  
Old 05-20-2012, 02:44 AM
forecaster forecaster is offline
Junior Member
 
Join Date: Apr 2012
Posts: 3
Default Re: What Quadratic Programming Package?

I had the same problem with solve.QP.

Try ipop (kernlab package) and it will work.
Reply With Quote
Reply

Tags
hw7, package, quadratic programming

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:55 AM.


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.