[SciPy-Dev] scipy.interpolate.Rbf default epsilon

Ralf Gommers ralf.gommers@googlemail....
Wed Aug 17 11:11:50 CDT 2011


I opened http://projects.scipy.org/scipy/ticket/1495 to keep track of this.

Ralf


On Thu, Jul 21, 2011 at 2:47 PM, J.J. Green <j.j.green@gmx.fr> wrote:

> Hi all,
>
> I believe that there is a problem with the default value
> of the "epsilon" parameter in the scipy.interpolate.Rbf
> initialisation function.
>
> In the original documentation for the library from which
> this package is derived (Matlab code by Alex Chirokov)
> the author states that epsilon should be "the average
> distance between nodes", but means "the average distance
> between consecutive nodes" (slide 10 of the ppt included
> with the matlab package, available here
>
>
> http://www.mathworks.com/matlabcentral/fileexchange/10056-scattered-data-interpolation-and-approximation-using-radial-base-functions
> ).
>
> The distinction is not clear as the author deals with the
> one dimensional case in his example.
>
> The version in scipy.interpolate.Rbf takes this advice literally
> and calculates the mean distance between nodes, so uses a
> value of epsilon which is *much* too large in general.
>
> I noticed this when getting bad results interpolating from
> 300 data-points on a region 4,500 square, the mean distance
> between *nearest* data-points is around 330, but the default
> epsilon used by the package was 2,500.
>
> To fix this one could use the method from the original package
> (matlab)
>
>  (prod(max(x')-min(x'))/nXCount)^(1/nXDim);
>
> ie, take the volume of the bounding cube, divide by the number
> of points and take the n-th root (n = number of dimensions).
>
> This approach would give 260 for my example above.
>
> Cheers
>
> Jim
> --
> J.J. Green <j.j.green@gmx.fr>
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20110817/13efbd53/attachment.html 


More information about the SciPy-Dev mailing list