This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ng) techniques. We will examine how to do this in
We can write the Lagrangian equation in matrix form: such that
denotes an vector; Matrix
wikicour senote.com/w/index.php?title= Stat841&pr intable= yes 63/74 10/09/2013 Stat841 - Wiki Cour se Notes and are vectors containing all 0s or all 1s respectively Using this matrix notation, we can use Matlab's built in quadratic programming routine, quadprog
(http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/quadprog.html) . Quadprog example
Let's use q a p o to find the solution to
udrg . Matlab's q a p o function minimizes an equation of the following form:
udrg such that: , We can now see why we kept the and
constant in the original derivation of the equation. The function is called as such: x = q a p o ( , , , , e , e , b u ) The variables correspond to values in the equation above.
We can now try to find the solution to
change how we call q a p o ).
udrg (though, it should be noted, that in we subtract the first term rather than add it; I'm not sure if this difference would We'll use a simple one- dimensional data set, which is essentially y = - 1 or 1 + Gaussian noise. (Note: you could easily put the values straight into the quadprog equation;
they are separated for clarity.)
u =[;%Teei n uprbud
s o pe
udrgSfAbAqbql,b; This gives us the optimal ... or at least I think it should, but it does not appear to work for me (that is, despite setting the lower boundary of 0, a number of values are still
negative. Whether this is just the nature of q a p o or an error on my part is an exercise for the reader).
udrg Examining K.K.T. conditions
Karush- Kuhn- Tucker conditions (http://en.wikipedia.org/wiki/Karush%E2%80%93Kuhn%E2%80%93Tucker_conditions) (more info (http://webrum.unimannheim.de/mokuhn/public/KarushKuhnT...
View Full Document
- Winter '13