LFD Book Forum

LFD Book Forum (http://book.caltech.edu/bookforum/index.php)
-   Homework 7 (http://book.caltech.edu/bookforum/forumdisplay.php?f=136)
-   -   MATLAB, but no quadprog (http://book.caltech.edu/bookforum/showthread.php?t=1160)

the cyclist 08-26-2012 06:48 AM

MATLAB, but no quadprog
 
I have MATLAB, but because I do not have the Optimization Toolbox, I do not have quadprog(). What are my options for getting the SVM problems solved?

Here are the options as I see them:
  • Free trial of Optimization Toolbox [not sure if I can get that download immediately, but will try soon]
  • Download Octave and see if qp() will work in MATLAB
  • Download Octave and try to start from scratch there
  • Randomly guess at the answer for this assignment :(
  • Write my own quadratic programming solver from scratch

These are listed in roughly my order that I think they might work for me.

Any thoughts or other options are welcome.

How badly off will I be for the last couple assignments, or the final, if I cannot get any quadratic programming to work?

patrickjtierney 08-26-2012 07:57 AM

Re: MATLAB, but no quadprog
 
I'd suggest the third one. Download and use Octave. The installation is fairly painless, and I believe qp() is in the standard distribution. The only differences will be that some functions behave slightly differently, but the basic code is identical. You should be up and running quickly.

For help, you can either use "help fcn-name" within Octave or refer to www.gnu.org/software/octave/doc/interpreter/ which is fairly easy to navigate.

If you do install Octave, do check out my posts in the Quadratic Programming thread here about how to get qp() to work for this problem.

the cyclist 08-26-2012 10:55 AM

Re: MATLAB, but no quadprog
 
Some googling has turned up another option. I found this page, which has some routines that seem to be working:

http://www.ecs.shimane-u.ac.jp/~kyoshida/qpeng.htm

algee 08-26-2012 11:16 AM

Re: MATLAB, but no quadprog
 
Another option is to use cvx from Stanford (Boyd)

munchkin 08-26-2012 11:21 AM

Re: MATLAB, but no quadprog
 
Quote:

Originally Posted by the cyclist (Post 4453)
Here are the options as I see them:
  • Write my own quadratic programming solver from scratch

This is actually not that bad an option and you learn quite a bit about the whole SVM and constraint optimization thing while doing it.

This paper is clearly written and has an SVM algorithm presented in great detail and it explains how to incorporate other kernels into the routine.
http://www.csie.ntu.edu.tw/~cjlin/pa...uadworkset.pdf

I've got it running in C#. It didn't take long to code -- most of the development time has been in testing. Now I actually understand what was derived in that lecture!

fgpancorbo 08-26-2012 11:35 AM

Re: MATLAB, but no quadprog
 
Quote:

Originally Posted by algee (Post 4460)
Another option is to use cvx from Stanford (Boyd)

I am lucky to have the matlab optimization toolbox. I would advise against using cvx for this homework for anyone not familiar with it already, vs say using qp of Octave, because it requires its own learning curve.

anmol77 05-06-2016 11:31 PM

Re: MATLAB, but no quadprog
 
I have MATLAB, but because I do not have the Optimization Toolbox, I do not have quadprog(). What are my options for getting the SVM problems solved?????

htlin 05-07-2016 07:16 AM

Re: MATLAB, but no quadprog
 
I generally suggests qp in octave, or specialized packages like LIBSVM. Hope this helps.


All times are GMT -7. The time now is 06:29 PM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2020, 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.