LFD Book Forum  

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #18  
Old 05-21-2012, 04:30 PM
kurts kurts is offline
Invited Guest
 
Join Date: Apr 2012
Location: Portland, OR
Posts: 70
Default Re: What Quadratic Programming Package?

Quote:
Originally Posted by jg2012 View Post
Anyone have success with Octave + qp?
Here's the setup that I used for the qp function

Code:
    n = length(X(:,1)); % How many points
    d = length(X(1,:)); % Dimensionality of X
    H = zeros(n,n);
    L = ones(n,1);
    L = -1.*L;       % Linear term is tall vector of -1
    lb = zeros(n,1); % Lower bound on alpha is tall vector of 0
    A = Y';          % Linear coefficient  (A)(alpha) + blin = 0
    blin = 0;        % 
    
    for i = 1:n;
        for j = 1:n;
            H(i,j) = Y(i)*Y(j)*X(j,:)*X(i,:)';
        end;
    end;

    [alpha, obj, info, lambda] = qp([],H,L,A,blin,lb,[]);
Reply With Quote
 

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 07:40 PM.


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