SciML / DataInterpolations.jl

A library of data interpolation and smoothing functions
MIT License
229 stars 45 forks source link

Misleading `QuadraticSpline` description #358

Open SouthEndMusic opened 1 week ago

SouthEndMusic commented 1 week ago

The QuadraticSpline description in the docs now reads:

Splines are a local interpolation method, meaning that the curve in a given spot is only affected by the points nearest to it.

That is true for the dependency of a spline curve on the control points. But for QuadraticSpline (and CubicSpline) we do not use the data directly as the control points, but solve for the control points to fit the data. This can lead to non-local influence, case and point:

using DataInterpolations
using Plots

t = 1:10
u = collect(1.0:10)
p = plot()

for u₆ in range(6, 7, length = 10)
    u[6] = u₆
    A = QuadraticSpline(u, t)
    plot!(A)
end

p

figure

ChrisRackauckas commented 1 week ago

Yeah good point, that should get updated.