LM with constraints...


Patf
12-03-2003, 10:46 AM
Hello,

I have to find the solution of a non-linear multi-variable equation, and I have then to implement the algorithm in JAVA.

Thanks to this forum and Numerical Recipes book, I wanted to use the Levenberg-Marquard algorithm.

The problem is I have a constraint on one of my variables (one of the 5 variables must be superior to -0.1, and inferior to 0.1).

Could you help me, please? What algorithm can I use? Is that possible to adapt LM in order to force some variables to be in an interval of values?
:confused:

Thanks a lot,
Pascal

d.wachss
08-11-2005, 08:12 PM
This was discussed somewhere in the modelling data forum. The SAS manual has a variety of techniques for reparameterizing to impose constraints. See

http://www.id.unizh.ch/software/unix/statmath/sas/sasdoc/stat/chap19/sect41.htm

In brief, to constrain a variable q to be A <= q <= B, then replace any appearance of q

f(q)

with

f (A + (B * exp(x))/(1+exp(x)))

and use x as the variable. Now x will vary in the algorithm from
-infinity to +infinity, but the expression (A + (B * exp(x))/(1+exp(x))) will only go from A to B.

This does run the risk that exp(x) will overflow if the value of q is very close to B.

Hope this helps.