Mathieu Malaterre wrote:
> I am reading:
> 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