[SciPy-user] odr weighted residuals

Christian Kristukat ckkart at hoc.net
Wed Aug 16 03:12:53 CDT 2006

Robert Kern wrote:
> Christian Kristukat wrote:
>> Hi,
>> this is probably a question for Robert but other people might be interested in
>> this as well, so here it goes:
>> Does odr support weighted residuals such that data points which are far away
>> from the bulk of points have small weights?
> Nope. Whatever else ODR is, it's still least-squares. In order to do what you 
> want, you will have to resort to iterated reweighting (Google for algorithms) or 
> some other scheme that is built on top of least-squares. Or you can construct 
> the appropriate non-linear optimization problem directly and use one of the 
> fmin*() functions.

Ok, thanks. I think I'll better remove the bad data points, but just for
curiosity: when using optimize.leastsq you have to provide the residuals. Can't
odr modified to calculate the residuals externally or would that break the

More information about the SciPy-user mailing list