Article View: sci.math.num-analysis
Article #647Re: Least Squares Fitting or Cubic Splines?
From: W.A.B.Evans
Date: Fri, 16 Oct 1992 21:49
Date: Fri, 16 Oct 1992 21:49
27 lines
2100 bytes
2100 bytes
In article <LSTERN.92Oct15162328@orville.nas.nasa.gov> lstern@orville.nas.nasa.gov (Louis G. Stern) writes: > Stuff Deleted > > Has anyone >come across some combination of splines + least-squared fitting before? > In developing a plotter algorithm for my PLOT program, I implemented a piecewise least squares fit of cubic polynomials to the "local" data. The usual least squares algorithm was subject to 2 constraints i.e. the cubic had to be continuous in value and gradient with the previous cubic - as indeed are cubic splines. These constraints are coded by means of Lagrange multipliers - so that to obtain the next cubic, I had to invert a 6x6 matrix (instead of the usual 4x4). The first 4 elements of the 6-vector are the cubic coeffs one desires and the last two are the Lagrange multipliers that are of no further use. To start it off, I do a normal unconstrained cubic fit to the leftmost local data - so that this technique is not as nicely symmetric as a normal cubic spline. I also used a "Lorentzian" weighting function to weight the "local" points the width of which I could choose. For narrow widths the piecewise polynomial fit curve makes valiant efforts to pass very close to every point (like cubic splines) but for larger widths it produces a smoother curve that ignores high frequency (noise?) in the data. Although this technique is fairly "obvious" I have never seen any textbook refer to it - but I dare say someone out there may know better. Regards, W. Alan B. Evans [ wabe@ukc.ac.uk ]
Technical Details
Message-ID:
<1912@eagle.ukc.ac.uk>Path:
arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!uknet!harrier.ukc.ac.uk!eagle.ukc.ac.uk!wabeReferences:
<LSTERN.92Oct15162328@orville.nas.nasa.gov>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!uknet!harrier.ukc.ac.uk!eagle.ukc.ac.uk!wabe From: wabe@ukc.ac.uk (W.A.B.Evans) Newsgroups: sci.math.num-analysis Subject: Re: Least Squares Fitting or Cubic Splines? Message-ID: <1912@eagle.ukc.ac.uk> Date: 16 Oct 92 21:49:18 GMT References: <LSTERN.92Oct15162328@orville.nas.nasa.gov> Reply-To: wabe@ukc.ac.uk (W.A.B.Evans) Distribution: sci.math.num-analysis Organization: Computing Lab, University of Kent at Canterbury, UK. Lines: 27