[SciPy-User] weighted griddata

Anne Archibald aarchiba@physics.mcgill...
Thu Sep 16 18:14:26 CDT 2010


On 16 September 2010 16:42, Pauli Virtanen <pav@iki.fi> wrote:
> Thu, 16 Sep 2010 20:27:46 +0000, Pauli Virtanen wrote:
> [clip]
>> Data smoothing is a different problem than interpolation, and the
>> algorithms in griddata cannot do it, and they are not easily modified to
>> do it either.
>
> No, I tell a lie, the Clough-Tocher 2D spline could easily be used for
> weighed data smoothing. The only change needed would be to adjust the
> gradient estimation routine so that instead of minimizing
>
>        ||surface curvature||
>
> it would allow for changes also in the data points, and would minimize
>
>        ||weighed deviation from data points|| + ||surface curvature||
>
> instead.
>
> Interesting idea. I'll need to look up some literature before thinking
> more about it -- this particular wheel must already be invented...

I think so - in fact it's what the FITPACK splines do. At least the 1D
splines. They have the additional wrinkle that in addition to the
above optimization they try to find the "right" number of knots.

For the OP's original purpose, isn't that what "kriging" is for? I've
never used it, but as I understand it it's a form of interpolation
where the value at a point is the average of the nearest data values,
weighted by distance.

Anne


More information about the SciPy-User mailing list