[SciPy-user] memory error at leastsq

Jose Lopez lopmart at gmail.com
Sat Jun 14 05:26:21 EDT 2008


hi, help with memory error at leastsq

I am working with a model mathematic of mean squeared error, according to
the least square appproach, a solution is   sought by minimizing

          MSE(I,B) = (S1-(I*B))^2+ (S2-(I*B))^2 + (S3-(I*B))^2

where S1,S2,S3,I and B are matrix of k x l


and i work whit the optimize.leastsq of scipy, well, for k = 5 and l = 5
work fine, but for k=64 and l =64 scipy give  me  the  next error

MemoryError:
File: "c:\python25\lib....\minpack.py",line 268,in leastsq
retval =
_minpack._lmdif(func,x0,args,full_output,ftol,xtol,gtol,maxfev,epsfcn,factor,diag)

 my line code call  is

xopt=optimize.leastsq(funcion,IB,args=(Sgen)) where Sgen is S1,S2,S3 at
order lexicografic and IB is I and B at order lexicografic.
so, my questions are :  why happend it? and how am  I  solve it?
thanks

JL
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20080614/e39c1cad/attachment.html>


More information about the SciPy-User mailing list