
25.02.2014 23:04, Benny Malengier kirjoitti: [clip]
As to constrainst, typically I use: 1. if contstrained on [c,inf], rescale the parameter to p=c+exp(q), with q new parameter 2. if constrained on an interval, rescale the parameter to p=arctan(q) with some offset and scaling for the interval size and start.
Most optimization toolboxes I've seen use projection methods to deal with boundaries in LM. [clip]
As to LM, it's actually a simple algorithm. I used to have a C implementation before using python on minpack. Adapting lmder.or a cython implemetation seems not too hard to add sparse. The problem would be a good sparse implementation in fortran, not the LM algorithm. No experience on that. Doing LM in cython should be fast too.
There's likely no real need to write it in a low-level language, as most of the algorithm should decompose to some matrix algebra. If it doesn't, then writing a sparse version wouldn't be possible... Porting LMDER to Python has been done (a several times), but as such, it doesn't have so much advantage over MINPACK. -- Pauli Virtanen