bug-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gsl] What I am doing wrong / gsl_interp_polynomial


From: Raymond Rogers
Subject: Re: [Bug-gsl] What I am doing wrong / gsl_interp_polynomial
Date: Tue, 01 Dec 2015 00:22:14 +0000

Are you sure you aren't fitting noise?  This results in oscillation due
instantaneous fluctuations shoving high frequency into the model.

On Mon, Nov 30, 2015, 6:58 PM Patrick Alken <address@hidden> wrote:

> Hello,
>
>    I confirmed that your program is failing for the polynomial
> interpolation, but polynomial interpolation is known to be difficult for
> large datasets. From the manual:
>
> ====
> Interpolation Type: gsl_interp_polynomial
>
>      Polynomial interpolation. This method should only be used for
> interpolating small numbers of points because polynomial interpolation
> introduces large oscillations, even for well-behaved datasets. The
> number of terms in the interpolating polynomial is equal to the number
> of points.
> ====
>
> So basically you are trying to fit a degree 1000 polynomial to your
> dataset, which will not be numerically stable - even though your dataset
> is well behaved.
>
> Cubic splines are probably the way to go here, but if you insist on a
> degree 1000 polynomial (even though you shouldn't) I might be able to
> give you some further ideas.
>
> You mentioned that previous versions of GSL worked for you. Can you
> verify if you used exactly this same dataset successfully with a
> previous version of GSL? If so please tell me the version number.
>
> Thanks,
> Patrick
>
> On 11/30/2015 10:25 AM, Petrus, Adam (UK) wrote:
> > I am attempting to use the polynomial interpolation method with GSL.
> However I am getting very strange results.
> >
> > If I run the attached program I get the below result. If I change the
> method to linear or cspline the interpolation works fine.
> >
> > Not in previous gsl versions the polynomial interpolation has worked!
> >
> > [cid:image001.png@01D12B93.B5E118F0]
> >
> > Is there something I am missing?
> >
> > Yours aye
> >
> > Adam
> >
> >
> >
> > ********************************************************************
> > This email and any attachments are confidential to the intended
> > recipient and may also be privileged. If you are not the intended
> > recipient please delete it from your system and notify the sender.
> > You should not copy it or use it for any purpose nor disclose or
> > distribute its contents to any other person.
> > ********************************************************************
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]