[SciPy-Dev] SciPy Goal

josef.pktd at gmail.com josef.pktd at gmail.com
Mon Jan 9 10:46:28 EST 2012


On Mon, Jan 9, 2012 at 8:02 AM, Zachary Pincus <zachary.pincus at yale.edu> wrote:
> Also, as long as a list is being made:
> scipy.signal has matched functions [cq]spline1d() and [cq]spline1d_eval(), but only [cq]spline2d(), with no matching _eval function.
>
> And as far as FITPACK goes, I agree can be extremely, and possibly dangerously, "quirky" -- it's prone to almost arbitrarily bad ringing artifacts when the smoothing coefficient isn't large enough, and is very (very) sensitive to initial conditions in terms of what will and won't provoke the ringing. It has its uses, but it seems to me odd enough that it really shouldn't be the "default" 1D spline tool to direct people to.

Do you have an example of "arbitrarily" bad ringing?

>From what I was reading up on splines in the last weeks, I got the
impression was that this is a "feature" of interpolating splines, and
to be useful with a larger number of points we always need to smooth
sufficiently (reduce knots or penalize).
(I just read a comment that R with 5000 points only chooses about 200 knots).

Josef


>
> Zach
>
>
> On Jan 9, 2012, at 6:37 AM, Pauli Virtanen wrote:
>
>> 05.01.2012 04:16, Zachary Pincus kirjoitti:
>>> Just one point here: one of the current shortcomings in scipy
>>> from my perspective is interpolation, which is spread between
>>> interpolate, signal, and ndimage, each package with strengths
>>> and inexplicable (to a new user) weaknesses.
>>
>> Interpolation and splines are indeed a weak point currently.
>>
>> What's missing is:
>>
>> - interface for interpolating gridded data (unifying ndimage,
>>  RectBivariateSpline, and scipy.spline routines)
>>
>> - the interface for `griddata` could be simplified a bit
>>  (-> allow variable number of arguments). Also, no natural neighbor
>>  interpolation so far.
>>
>> - FITPACK is a quirky beast, especially its 2D-routines (apart from
>>  RectBivariateSpline) which very often don't work for real data.
>>  I'm also not fully sure how far it and its smoothing can be trusted
>>  in 1D (see stackoverflow)
>>
>> - There are two sets of incompatible spline routines in
>>  scipy.interpolate, which should be cleaned up.
>>
>>  The *Spline class interfaces are also not very pretty, as there is
>>  __class__ changing magic going on.
>>
>>  The interp2d interface is somewhat confusing, and IMO would be best
>>  deprecated.
>>
>> - There is also a problem with large 1D data sets: FITPACK is slow, and
>>  the other set of spline routines try to invert a dense matrix,
>>  rather than e.g. using the band matrix routines.
>>
>> - RBF sort of works, but uses dense matrices and is not suitable for
>>  large data sets. IDW interpolation could be an useful addition here.
>>
>> And probably more: making a laundry list of what to fix could be helpful.
>>
>> _______________________________________________
>> SciPy-Dev mailing list
>> SciPy-Dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/scipy-dev
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev



More information about the SciPy-Dev mailing list