Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.maple > #1175

Re: [OT] Smoothing a curve

Newsgroups comp.soft-sys.math.maple
Date 2015-08-12 10:27 -0700
References <MPG.3010829692619cf698968a@freenews.netfront.net>
Message-ID <979799f4-dfb0-4172-9ee0-1dfb2dc01739@googlegroups.com> (permalink)
Subject Re: [OT] Smoothing a curve
From RGVickson@shaw.ca

Show all headers | View raw


On Wednesday, July 15, 2015 at 6:46:48 AM UTC-7, Centexbel wrote:
> Hello,
> 
> not a specially Maple question but I have some 20000 (X, Y) 
> values starting as follow :
> 
>  172.013964   	 1.5688   
>  172.013965   	 1.5600   
>  172.013968   	 1.5568   
>  172.013969   	 1.5557   
>  172.013978   	 1.5541   
>  172.013990   	 1.5762   
>  172.013994   	 1.5629   
>  172.014001   	 1.5719   
>  172.014002   	 1.5629   
>  172.014004   	 1.5566   
>  172.014005   	 1.5606   
>  172.014016   	 1.5441   
>  172.014026   	 1.5610   
>  172.014036   	 1.5672   
>  172.014054   	 1.5655   
>  172.014054   	 1.5643   
>  172.014060   	 1.5629   
>  172.014072   	 1.5579   
>  172.014073   	 1.5602   
>  172.014089   	 1.5590   
>  172.014093   	 1.5608   
>  172.014106   	 1.5502   
>  172.014130   	 1.5593   
>  172.014144   	 1.5624   
>  172.014148   	 1.5630   
>  172.014151   	 1.5581   
>  172.014172   	 1.5754   
>  172.014181   	 1.5726   
>  172.014203   	 1.5589   
>  172.014213   	 1.5607   
>  172.014231   	 1.5699   
>  172.014234   	 1.5574   
>  172.014238   	 1.5482   
>  172.014250   	 1.5650   
>  172.014263   	 1.5594   
>  172.014263   	 1.5656   
>  172.014288   	 1.5716   
>  172.014289   	 1.5618   
> 
> How can I find an estimated value of Y for any X value ?
> 
> 
> Regards,
> 
> Philippe Lemaire
> 
> --- news://freenews.netfront.net/ - complaints: news@netfront.net ---


You can do a least-squares fit manually. If, for example, you want a linear fit of the form y = a + b*x, a least-squares fit is obtained from the minimization of S = sum_{i=1..N} (a + b*x[i]-y[i])^2. You can either use the standard, well-known formulas for the "best" a and b, or you can let Maple set the derivatives diff(S,a) and diff(S,b) to zero, and solve the linear equations using "solve" or "fsolve".

If, instead, you want a quadratic, then minimize S = S(a,b,c) =sum_{i=1..N}(a + b(x[i]+c*x[i]^2)^2.

In general, to fit a function of the form y = f(x,a1,a2,a3,...) involving some unknown parameters a1,a2,a3,..., you want to minimize S(a1,a2,a3,...) = sum_i (f(x[i],a1,a2,a3, ...) - y[i])^2, which you might be able to do by numerical equation-solving, etc.

Back to comp.soft-sys.math.maple | Previous | NextPrevious in thread | Find similar


Thread

[OT] Smoothing a curve Centexbel <philippe.lemaire@centexbel.be> - 2015-07-15 15:46 +0200
  Re: [OT] Smoothing a curve Joe Riel <joer@san.rr.com> - 2015-07-15 07:36 -0700
    Re: [OT] Smoothing a curve Centexbel <philippe.lemaire@centexbel.be> - 2015-07-16 16:54 +0200
      Re: [OT] Smoothing a curve Joe Riel <joer@san.rr.com> - 2015-07-16 10:40 -0700
  Re: [OT] Smoothing a curve William Unruh <unruh@invalid.ca> - 2015-07-15 15:53 +0000
    Re: [OT] Smoothing a curve Centexbel <philippe.lemaire@centexbel.be> - 2015-07-16 16:56 +0200
      Re: [OT] Smoothing a curve William Unruh <unruh@invalid.ca> - 2015-07-16 15:07 +0000
  Re: [OT] Smoothing a curve tomdean1939 <tomdean@speakeasy.org> - 2015-07-17 01:22 -0700
  Re: [OT] Smoothing a curve RGVickson@shaw.ca - 2015-08-12 10:27 -0700

csiph-web