[Offtopic] Line fitting [was Re: Numpy outlier removal]

Maarten maarten.sneep at knmi.nl
Tue Jan 8 17:47:52 CET 2013


On Tuesday, January 8, 2013 10:07:08 AM UTC+1, Terry Reedy wrote:

> With the line constrained to go through 0,0, a line eyeballed with a 
> clear ruler could easily be better than either regression line, as a 
> human will tend to minimize the deviations *perpendicular to the  line*, 
> which is the proper thing to do (assuming both variables are measured in 
> the same units).

In that case use an appropriate algorithm to perform the fit. ODR comes to mind. http://docs.scipy.org/doc/scipy/reference/odr.html

Maarten



More information about the Python-list mailing list