Rasmussen and Williams section 2.2 (page 16) gives a formula for the posterior distribution of test points, $f_{\star}$, of a Gaussian Process when conditioned on some training points, $f$ in Equation 2.19. At the end of this section they claim that extending the analysis to multidimensional inputs is "trivial" and I do not see this fact at all. My question is how do I do any of this stuff if the inputs are in 2D?
It is clear from the definition of the covariance matrix that it is always a 2D object, in light of this fact, the resulting operations with $h$-dimensional inputs make no sense to me.
They give the process for sampling from a multivariate Gaussian distribution in Appendix A.2: If $x \sim \mathcal{N}(\mathbf{m}, K)$, then $\mathbf{x} = \mathbf{m} + L\mathbf{u}$, where $\mathbf{u}$ is a vector the length of $\mathbf{x}$ with each term drawn independently from a standard normal distribution and $L$ is the Cholesky decomposition of the matrix $K$.
When $h=1$, the process is exactly as described in the text. However, if $h=2$, what do I do? The output is scalar, the input is 2D. I know the covariance matrix relates indexes and not locations, and this works as simple matrix math when $h=1$, because vectors are a handy way to manipulate all the points being evaluated at once. In short, the index in the vector directly corresponds to the index of the covariance function.
Getting back to $h=2$, evaluating $K$ is straightforward and the Cholesky decomposition is the same as in the $h=1$ case. I guess that the output is then given by $X = \mu + (L\mathbf{u}_1) \otimes (L\mathbf{u}_2)$ where $X$ is a matrix value of the outputs at all of the finite number of test locations, $\mathbf{\mu}_x$ is the prior mean evaluated at the input coordinates (remember the input coordinates are 2D, meaning $\mathbf{\mu}_x$ is also a matrix), and $\mathbf{u}_1$ and $\mathbf{u}_2$ are two different vectors of lengths. I have no idea if this is correct, but it seems reasonable.
Moving on in my question(s). Given a joint normal distribution as in Appendix A.2 (Equation A.5)
$$ \begin{bmatrix} \mathbf{x} \\ \mathbf{y} \end{bmatrix} \sim \mathcal{N} \left( \begin{bmatrix} \mathbf{\mu}_x \\ \mathbf{\mu}_y \end{bmatrix} , \begin{bmatrix} A & C \\ C^T & B \end{bmatrix} \right), $$
they define (Equation A.6)
$$ \mathbf{x}|\mathbf{y} \sim \mathcal{N} \left( \mathbf{\mu}_x + CB^{-1} (\mathbf{y} - \mathbf{\mu}_y) , A - C B^{-1}C^T \right) $$
Once again, when $h=1$, I have no problem evaluating these functions. When $h=2$, I have no idea what to do. For example, assume I have 10 test points and 3 training points. Then $A$ is a $10\times10$ matrix, $B$ is a $3\times3$ matrix and $C$ is a $10\times3$ matrix. Further, $(\mathbf{y} - \mathbf{\mu}_y)$ is a $3\times1$ vector.
Looking at the posterior mean, the dimensions make no sense: $$ \mathbf{\mu}_x + CB^{-1} (\mathbf{y} - \mathbf{\mu}_y) \\ 10\times10 + (10\times3)(3\times3)(3\times1) $$
where the last line shows the sizes of the various matrices. This is very clearly the addition of a $10\times10$ matrix and a $10\times1$ matrix, which makes no sense.
The sum total of this is to say that I am very clearly missing something about how to extend Gaussian Processes to multidimensional inputs. What am I missing?
--
Note that this question references a defunct website and uses functions in R to perform the sampling. I am looking for a mathematical description that I can use to understand the problem better and expand to even higher dimension.
I found this website showing a loop-based process in python, but because of the loops and rearrange calls used, it isn't clear to me what is going on.