Nearest-neighbor interpolation

670 Views Asked by At

I read in a book that the nearest-neighbor interpolation results in a function whose derivative is either zero or undefined.

Can anyone explain what does it mean when the derivative of a function is either zero or undefined? And how does this connect with the nearest-neighbor interpolation?

With Thanks

1

There are 1 best solutions below

2
On

You have a function $f$ defined on a discrete subset $D$ of a metric space $E$ (it can be the real plane, but it does not really matter). The nearest-neighbor interpolation of $f$ is another function $g$ that's defined everywhere, and whose value on any point $x\in E$ is exactly the value of $f$ on the nearest point $y\in D$ to $x$, where it exists, and it does not really matter what you chose when the nearest point is non-unique.

On the open-dense subset where $g$ is defined, it is piecewise-constant, you can easily prove that in a small enough ball around a point that has a nearest neighbor, all the points in that ball have the same nearest neighbor. So the derivative in those areas is 0.

It remains to be seen what happens on the boundaries between those regions. Remember that we haven't really defined $g$ there. Now, if the point $x$ has several nearest neighbors, it may happen that in all these neighbors $f$ has the same value. In that case you can extend $g$ by continuity, and it will still be constant.

If on the other case $f$ takes different values at the nearest neighbors of $x$, then there is no way to define $g(x)$ for the function to be continuous, much less differentiable, because in every ball around $x$ you will have points where $g$ assumes different values.