page_title: Inverse distance weighting
section_title: Basic form
hierarchical_section_title: Inverse distance weighting / Shepard's method / Basic form
caption_attribution_description: English: Shepards interpolation method, sampling a smooth function, exp(-x^2-y^2). See also File:Shepard interpolation.png
context_page_description: Inverse distance weighting is a type of deterministic method for multivariate interpolation with a known scattered set of points. The assigned values to unknown points are calculated with a weighted average of the values available at the known points.
  The name given to this type of methods was motivated by the weighted average applied, since it resorts to the inverse of the distance to each known point when assigning weights.
context_section_description: A general form of finding an interpolated value  at a given point  based on samples  for  using IDW is an interpolating function:
  where
  is a simple IDW weighting function, as defined by Shepard, x denotes an interpolated (arbitrary) point, xᵢ is an interpolating (known) point,  is a given distance (metric operator) from the known point xᵢ to the unknown point x, N is the total number of known points used in interpolation and  is a positive real number, called the power parameter.
  Here weight decreases as distance increases from the interpolated points. Greater values of  assign greater influence to values closest to the interpolated point, with the result turning into a mosaic of tiles (a Voronoi diagram) with nearly constant interpolated value for large values of p. For two dimensions, power parameters  cause the interpolated values to be dominated by points far away, since with a density  of data points and neighboring points between distances  to , the summed weight is approximately
  which diverges for  and . For M dimensions,  the same argument holds for .  For the choice of value for p, one can consider the degree of smoothing desired in the interpolation, the density and distribution of samples being interpolated, and the maximum distance over which an individual sample is allowed to influence the surrounding ones.
  Shepard's method is a consequence of minimization of a functional related to a measure of deviations between tuples of interpolating points {x, u} and i tuples of interpolated points {xᵢ, uᵢ}, defined as:
  derived from the minimizing condition:
  The method can easily be extended to other dimensional spaces and it is in fact a generalization of Lagrange
  approximation into a multidimensional spaces. A modified version of the algorithm designed for trivariate interpolation was developed by Robert J. Renka and is available in Netlib as algorithm 661 in the toms library.
caption: Shepard's interpolation for different power parameters p, from scattered points on the surface 
    
      
        
          z
          =
          exp
          ⁡
          (
          −
          
            x
            
              2
            
          
          −
          
            y
            
              2
            
          
          )
        
      
      {\displaystyle z=\exp(-x^{2}-y^{2})}
exif: {}