[SciPy-User] leastsq and multiprocessing

Sturla Molden sturla.molden at gmail.com
Thu May 29 13:55:41 EDT 2014


Sturla Molden <sturla.molden at gmail.com> wrote:

> The computational compexity here is O(N**3), compared to O(N) for the
> callbacks. The bigger the problem, the more the QR part will dominate. 

In other words, as the size of the problems increases, the speed
improvement from using multiprocessing will go towards 0. You will have no
benefit from using multiprocessing with leastsq when you really need it. So
put the parallel computing in leastsq in the right place.

In the long run, it would be better to replace the Fortran MINPACK leastsq
with one that uses LAPACK *GELS driver for each linearized least squares
fit. (BTW: Using *GELSS (scipy.linalg.lstsq) kind of defies the purpose of
using a regularization in the linearized least squares fits, as the SVD
solves this problem automatically.)

Sturla




More information about the SciPy-User mailing list