Alright, I have rewritten the non-linear regression code using the LM method. The results are much better. For most initial conditions that I've tried the code converges to values that are "not too wrong". Also, the region from which in converges to "the right values" has improved. I am still hoping for better results, but there has been progress. I was wondering if Gnumeric might do something to "help the user" pick good initial values. After all, now matter how much the function improves, there will always be parameters for which it won't converge to the right values. How difficult would it be to let the user plot his own user-defined function? If the user picks initial values that "look okay", they are mosty likely close enough for the LM method to converge to the "right" values. For those interested, my Python program is attached (Python makes a good prototyping language). It expects to find the 'numarray' library. Cheers, Daniel
Attachment:
regression.py
Description: version 0.0.0