Sea Level Rise
On 27/02/2018 20:46, N_Cook wrote:
On 27/02/2018 19:53, Martin Brown wrote:
[snip]
Ie given a dataset running from MinTime to MaxTime then for each t
MyTime =Â* (2t-(Mintime+Maxtime))/(MaxTime-MinTime)
t = MintimeÂ*Â* Mytime = -1
t = MaxtimeÂ*Â* Mytime = 1
(subject to typos)
Unless their fitting code is hopeless this should be stable.
Y = 9.785195 + 0.250222*(x-25) -0.013375* (x-25)^2 -0.000468*(x-25)^3
converged with
R^2 =Â* 0.982687
RMS Error =Â* 0.225851
so larger R^2 than best Fractional power fit but also larger RMS Error
and also the awkward y=9.785195 intercept
That is because you have moved the origin. You can compute the
equivalent ordinary polynomial by expanding the terms again.
1 x x^2 x^3
a a
+b(x-25) -25b b
+c(x-25)^2 625c -50c c
+d(x-25)^3 -15625d 1875d -75d d
And sum up the terms (subject to typos).
I suggest you also try it with fitting to [(x-25)/25]^N
The coefficients will then be 25^n bigger for each polynomial but the
numerical solution will be significantly more stable.
Iff your data are uniformly spaced you could also get the right answer
by taking their dot product with the Tchebyshev polynomials. That is
another way to make the problem even better conditioned |x| 1.
They are of the form
t0(x) = 1
t1(x) = x
t2(x) = 2x^2-1
t3(x) = 4x^3-3x
(subject to typos)
tn+1(x) = 2xTn(x)-Tn-1(x)
A naughty way to compute them is cos(n arcos(x)) which is obviously
capable of going badly wrong if |x|1
--
Regards,
Martin Brown
|