[Scipy-tickets] [SciPy] #1495: Rbf default epsilon too large

SciPy Trac scipy-tickets@scipy....
Wed Aug 17 11:10:57 CDT 2011


#1495: Rbf default epsilon too large
-------------------------------+--------------------------------------------
 Reporter:  rgommers           |       Owner:  somebody   
     Type:  defect             |      Status:  new        
 Priority:  normal             |   Milestone:  Unscheduled
Component:  scipy.interpolate  |     Version:  devel      
 Keywords:  rbf                |  
-------------------------------+--------------------------------------------
 From J.J. Green, mailing list, 21 July 2011:
 {{{
 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.
 }}}

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1495>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list