title: Algorithm: How to smoothly interpolate/reconstruct sparse samples with noise?
body: <p>This question is not directly related to a particular programming language but is an algorithmic question.</p>
  <p>What I have is a lot of samples of a 2D function. The samples are at random locations, they are not uniformly distributed over the domain, the sample values contain noise and each sample has a confidence-weight assigned to it.</p>
  <p>What I'm looking for is an algorithm to reconstruct the original 2D function based on the samples, so a function <code>y' = G(x0, x1)</code> that approximates the original well and interpolates areas where samples are sparse smoothly.</p>
  <p>It goes into the direction of what <a href="https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.griddata.html" rel="nofollow noreferrer">scipy.interpolate.griddata</a> is doing, but with the added difficulty that:</p>
  <ul>
  <li>the sample values contain noise - meaning that samples should not just be interpolated, but nearby samples also averaged in some way to average out the sampling noise.</li>
  <li>the samples are weighted, so, samples with higher weight should contrbute more strongly to the reconstruction that those with lower weight.</li>
  </ul>
  <p>scipy.interpolate.griddata seems to do a Delaunay triangulation and then use the barycentric cordinates of the triangles to interpolate values. This doesn't seem to be compatible with my requirement of weighting samples and averaging noise though.</p>
  <p>Can someone point me in the right direction on how to solve this?</p>