WORHP Kata of June 2023: Thin plate spline ⌚ 2023-06-01A kata (in the context of programming) is a small training unit to practise coding. In this series of WORHP Katas we present standard problems of optimization which you can use to get familiar with optimization (and our optimization software WORHP).
Kata: Thin plate splines can be used to interpolate data in a smooth way.
For data points , , the thin plate spline is minimizing the distance to the data points and simultaneously (using an appropriate value of ) the curvature of the function :
To solve this problem numerically, we can discretize it on an equidistant grid and replace the partial derivatives by their numerical approximations (using adjacent points on the grid). Instead of the integrals, we will only sum up the integrand function on the equidistant grid.
Now, find the discretized version of on to interpolate these data points:
A solution will be provided with the next WORHP Kata.
Solution of last WORHP Kata: For the points , we formulate this optimization problem:
To avoid division by zero during the WORHP iterations, we added a value of to the denominator.
For the initial guess, we can use random values, or some systematic guesses, cf. this CPP code. In both cases our solver WORHP returns the vertices of an icosahedron: