[SciPy-Dev] Splines in Scipy [was: SciPy Goal]
Pauli Virtanen
pav@iki...
Tue Jan 10 04:14:56 CST 2012
09.01.2012 21:30, josef.pktd@gmail.com kirjoitti:
[clip]
> One impression I had when I tried this out a few weeks ago, is that
> the spline smoothing factor s is imposed with equality not inequality.
> In the examples that I tried with varying s, the reported error sum of
> squares always matched s to a few decimals. (I don't know how because
> I didn't see the knots change in some examples.)
As far as I understand the FITPACK code, it starts with a low number of
knots in the spline, and then inserts new knots until the criterion
given with `s` is satisfied for the LSQ spline. Then it adjusts k-th
derivative discontinuities until the sum of squares of errors is equal
to `s`.
Provided I understood this correctly (at least this is what was written
in fppara.f): I'm not so sure that using k-th derivative discontinuity
as the smoothness term in the optimization is what people actually
expect from "smoothing". A more likely candidate would be the curvature.
However, the default value for the splines is k=3, cubic, which yields a
somewhat strange "smoothness" constraint.
If this is indeed what FITPACK does, then it seems to me that the
approach to smoothing is somewhat flawed. (However, it'd probably best
to read the book before making judgments here.)
Pauli
More information about the SciPy-Dev
mailing list