Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:: [': 0.03; 'algorithm': 0.03; 'regression': 0.09; 'terry': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; '(assuming': 0.16; 'measured': 0.16; 'reedy': 0.16; 'subject:Line': 0.16; 'wrote:': 0.17; 'tend': 0.17; 'variables': 0.17; 'subject:] ': 0.19; 'appropriate': 0.20; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header :In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'mind.': 0.27; 'subject: [': 0.29; 'could': 0.32; 'received:google.com': 0.34; 'clear': 0.35; 'subject:]': 0.35; 'received:209.85': 0.35; 'url:org': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'perform': 0.38; 'url:docs': 0.38; 'easily': 0.39; 'fit.': 0.65; '2013': 0.84; 'subject:removal': 0.84; 'url:reference': 0.84; 'maarten': 0.91; 'ruler': 0.91 Newsgroups: comp.lang.python Date: Tue, 8 Jan 2013 08:47:52 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=145.23.254.101; posting-account=iJTQsAoAAABApfTuFpnnNwqdJKQ-QQBs References: <50ea28e7$0$30003$c3e8da3$5496439d@news.astraweb.com> <50ea58f0$0$21851$c3e8da3$76491128@news.astraweb.com> <50eb0cd2$0$30003$c3e8da3$5496439d@news.astraweb.com> <50eb7513$0$30003$c3e8da3$5496439d@news.astraweb.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 145.23.254.101 MIME-Version: 1.0 Subject: Re: [Offtopic] Line fitting [was Re: Numpy outlier removal] From: Maarten To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Message-ID: Lines: 11 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1357663681 news.xs4all.nl 6867 [2001:888:2000:d::a6]:42112 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:36442 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