![](https://secure.gravatar.com/avatar/80473ff660f57aa7f90affadd2240008.jpg?s=120&d=mm&r=g)
I find that the following script consistently core dumps (scipy latest CVS, Numeric 23.7, ATLAS 3.6.0) on both FC1 and FC3 when I say "python script.py" at the command line. I was trying to test problems others have reported using the Jacobian argument to leastsq, including a message way back in April 2003 from John Hunter. I'm pretty familiar with MINPACK, having used it to fit some functions a while back. Where might I start looking for the problem? from Numeric import * import scipy as S def ros(x): return array([10*(x[0] - x[1]**2), 1-x[1]]) def dros(x): return array([[-20*x[0], 10],[-1,0]]) def dros_trans(x): return array([[-20*x[0], -1],[10,0]]) x0=[-1.2,1.0] print "No Jacobian:" print S.optimize.leastsq(ros,x0) print "With Jacobian, try 1:" print S.optimize.leastsq(ros,x0,Dfun=dros) print "With Jacobian, try 2:" print S.optimize.leastsq(ros,x0,Dfun=dros_trans) print "With Jacobian, try 3:" print S.optimize.leastsq(ros,x0,Dfun=dros,col_deriv=1) print "With Jacobian, try 4:" print S.optimize.leastsq(ros,x0,Dfun=dros_trans,col_deriv=1)
![](https://secure.gravatar.com/avatar/4ebd883c704507c64eaebce2e0d9f627.jpg?s=120&d=mm&r=g)
Hi developers I wonder if there are plans to implement a routine in scipy.stats similar to MATLAB's robustfit() function which handels outliers in a data set by iteratively adjusting a residual weight array. Cheers, steve -- There are three types of people in this world: those who make things happen, those who watch things happen and those who wonder what happened. - Mary Kay Ash
![](https://secure.gravatar.com/avatar/ec366db3649cf13f4061b519193849d6.jpg?s=120&d=mm&r=g)
Steve Schmerler wrote:
Hi developers
I wonder if there are plans to implement a routine in scipy.stats similar to MATLAB's robustfit() function which handels outliers in a data set by iteratively adjusting a residual weight array.
I don't think anyone has any concrete plans to do so. Can you provide any documentation about the specific algorithm you'd like to see? I've encountered any number of such beasts (and don't trust any of them!). -- Robert Kern rkern@ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter
![](https://secure.gravatar.com/avatar/4ebd883c704507c64eaebce2e0d9f627.jpg?s=120&d=mm&r=g)
Robert Kern wrote:
Steve Schmerler wrote:
Hi developers
I wonder if there are plans to implement a routine in scipy.stats similar to MATLAB's robustfit() function which handels outliers in a data set by iteratively adjusting a residual weight array.
I don't think anyone has any concrete plans to do so. Can you provide any documentation about the specific algorithm you'd like to see? I've encountered any number of such beasts (and don't trust any of them!).
Never mind. I ended up using Numerical Recipe's medfit() function which works pertty well. Cheers, steve -- There are three types of people in this world: those who make things happen, those who watch things happen and those who wonder what happened. - Mary Kay Ash
participants (3)
-
Robert Kern
-
Stephen Walton
-
Steve Schmerler