Multivariate Interpolation on Unstructured Grids
This section presents alternative interpolation methods for non-rectilinear grids. First, I present the relatively simple case of fast warped interpolation on a curvilinear grid, which improves upon the interpolation in White (2015). Then, I present a machine learning approach to interpolation on unstructured grids based on Gaussian Process Regression as presented in Scheidegger & Bilionis (2019).
1Unstructured Grids¶
Unstructured interpolation arises in many dynamic programming applications when using the Endogenous Grid Method because the first-order conditions might be highly non-linear and non-monotonic, or because boundary constraints induce kinks in the policy and value functions. In these cases, the grid points generated by the EGM step are not evenly spaced, leading to the need for curvilinear interpolation. We saw in the previous subsection an approach to curvilinear interpolation based on White (2015) that is incapable of interpolation on structured grids. A similar approach was presented in Ludwig & Schön (2018) which used Delaunay interpolation. However, this approach is not well suited for our purposes because triangulation can be computationally intensive and slow, often offsetting the efficiency gains from the Endogenous Grid Method.
As an alternative to these methods, I introduce the use of Gaussian Process Regression (GPR) along with the Endogenous Grid Method. GPR is computationally efficient, and tools exist to easily parallelize and take advantage of hardware such as Graphics Processing Units (GPU)[1].
1.1Gaussian Process Regression¶
A Gaussian Process is an infinite dimensional random process for which every subset of random variables is jointly Gaussian or has a multivariate normal distribution.
where
Being infinitely dimensional, a Gaussian Process can be used to represent a probability distribution over the space of functions in dimensions. Thus, a Gaussian Process Regression is used to find the best fit function to a set of data points.
where is the vector of function values at the points , is the mean of the function, and is a kernel function that describes the covariance between the function values at different points.
A standard kernel function is the squared exponential kernel, or the radial basis function kernel, which is defined as
Using GPR to interpolate a function , we can both predict the value of the function at a point and the uncertainty in the prediction, which provides useful information as to the accuracy of the approximation.
1.2An example of the GPR¶
In Figure 7, we see the function we are trying to approximate along with a sample of data points for which we know the value of the function. In practice, the value of the function is unknown and/or expensive to compute, so we must use a limited amount of data to approximate it.
As we discussed, a Gaussian Process is an infinite dimensional random process which can be used to represent a probability of distributions over the space of functions. In Figure 8, we see a random sample of functions from the GPR posterior, which is a Gaussian Process conditioned on fitting the data. From this small sample of functions, we can see that the GP generates functions that fit the data well, and the goal of GPR is to find the one function that best fits the data given some hyperparameters by minimizing the negative log-likelihood of the data.
In Figure 9, we see the result of GPR with a particular parametrization[2] of the kernel function. The dotted line shows the true function, while the blue dots show the known data points. GPR provides the mean function which best fits the data, represented in the figure as an orange line. The shaded region represents a 95% confidence interval, which is the uncertainty of the predicted function. Along with finding the best fit of the function, GPR provides the uncertainty of the prediction, which is useful information as to the accuracy of the approximation.
- White, M. N. (2015). The method of endogenous gridpoints in theory and practice. Journal of Economic Dynamics & Control, 60, 26–41. 10.1016/j.jedc.2015.08.001
- Scheidegger, S., & Bilionis, I. (2019). Machine learning for high-dimensional dynamic stochastic economies. Journal of Computational Science, 33, 68–82. 10.1016/j.jocs.2019.03.004
- Ludwig, A., & Schön, M. (2018). Endogenous Grids in Higher Dimensions: Delaunay Interpolation and Hybrid Methods. Computational Economics, 51(3), 463–492. 10.1007/s10614-016-9611-2
- Gardner, J. R., Pleiss, G., Bindel, D., Weinberger, K. Q., & Wilson, A. G. (2018). GPyTorch: Blackbox Matrix-Matrix Gaussian Process Inference with GPU Acceleration. Advances in Neural Information Processing Systems.