From: Ian S. <ian...@st...> - 2007-05-21 08:45:17
|
Mathieu Malaterre wrote: > Hello, > > I am reading: > > http://paine.wiau.man.ac.uk/pub/doc_vxl/books/core/book_6.html#SEC62 > > I would like to know if there is anything standard for typical > constrain. For instance I know that my variable are positive(1) and > should be below a certain maximum(2). How would I express this in my > cost and/or maybe my gradf function ? > > I am pretty sure that simply heavily penalising my cost function if > not carefully thought could lead to incorrect results. Thus I am > wondering if there are any particular methodology for simple > constrains ? No. There is no particular methodology, at least not one that is guaranteed to work. I'd suggest adding a very steep conical ramp outside your constraints, with the ramp gradient magnitude being significantly larger than the maximum gradient magnitude inside your valid region. After the result comes you can check it is in the valid region and push it into the nearest valid region if necessary. Something like this vaguely worked for me with a small SVM training problem. If you need good constrained optimisation, then I'd recommend getting your hands on a proper constrained optimiser. A quick look on Google finds http://www.jeannot.org/~js/code/index.en.html Ian. |