# Optimal Prediction of Individual Vessel Trajectories Based on Sparse Gaussian Processes
## 3 Preliminaries  
### Gaussian Process Regression  
A GP can be defined as a collection of random variables, any finite number of which have a joint Gaussian distribution [7]. This provides posterior probabilistic outputs based on a Bayesian framework. It was first introduced by [PERSON] in 1993 and is known as kriging [32]. As indicated by [7], the details of the GP regression model are as follows. Assume a dataset of observed input-output pairs \(\{x_{i},\,t_{i}\}_{i=1}^{n}\), where \(x_{i}\in\mathbb{R}^{d}\) and \(t_{i}\in\mathbb{R}\), and the output value \(t_{i}\) is obtained as  
\[t_{i}=f(x_{i})+e_{i},\,\,\epsilon\,\,\sim\,\,\mathcal{N}\Big{(}0,\,\,\beta^{-1 }I\Big{)}, \tag{1}\]  
where \(f(x_{i})\), \(e_{i}\), and \(I\) denote the latent function, the independent identically distributed (i.i.d.) Gaussian noise with variance \(\beta^{-1}\), and \(n\times n\) identity matrix, respectively. The GP is parameterized by its mean and covariance functions. Thus, it can be written as:  
\[f(x)\,\sim\,\,\mathcal{GP}\big{(}m(x),\,\,k\big{(}x,x^{\prime}\big{)}\big{)}. \tag{2}\]  
The \(m(x)=\mathbb{E}[f(x)]\) is the mean function, and \(k(x,x^{\prime})=\mathbb{E}[(f(x)-m(x))(f(x^{\prime})-m(x^{\prime}))]\) is the covariance (kernel) function, which assigns the covariance element between any two sample points \((x,x^{\prime})\). In this article, three kernel functions with the hyperparameter vector \(\theta\) are adopted as follows:  
The squared exponential (SE) kernel function:  
\[k\big{(}x,x^{\prime}\big{|}\theta\big{)}={\sigma_{s}}^{2}\exp\left[-\frac{1}{ 2}\frac{\big{(}x-x^{\prime}\big{)}^{T}(x-x^{\prime})}{\sigma_{l}^{2}}\right], \,\,\theta=\{\sigma_{s},\,\,\sigma_{l}\}, \tag{3}\]  
where \(\sigma_{s}>0\) is the signal standard deviation and \(\sigma_{l}>0\) is the length scale. SE is an infinitely differentiable and widely used kernel function [7]. However, because there are limitations in modeling numerous physical processes using this kernel function, the Matern3/2 (MT32) and Matern5/2 (MT52) kernel functions are recommended [7]. The MT32 kernel function is defined as  
\[k\big{(}x,x^{\prime}\big{|}\theta\big{)}={\sigma_{s}}^{2}\Bigg{(}1+\frac{ \sqrt{3}r}{\sigma_{l}}\Bigg{)}\exp{\sigma_{s}}^{2}\Bigg{(}-\frac{\sqrt{3}r}{ \sigma_{l}}\Bigg{)}, \tag{4}\]  
where \(r=\sqrt{(x-x^{\prime})^{T}(x-x^{\prime})}\) is the Euclidean distance between \(x\) and \(x^{\prime}\). The MT52 kernel function is defined by \[k\big{(}x,x^{\prime}\big{|}\theta\big{)}=\sigma_{z}{}^{2}\Bigg{(}1+\frac{\sqrt{5}r}{ \sigma_{l}}+\frac{5r^{2}}{3\sigma_{l}^{2}}\Bigg{)}\exp\Bigg{(}-\frac{\sqrt{5}r}{ \sigma_{l}}\Bigg{)}. \tag{5}\]  
Moreover, the marginal distribution over the output \(\mathbf{t}=(t_{1},\ldots,t_{n})^{\text{T}}\), conditioned on the input vectors \(\mathbf{x}\), can be obtained as:  
\[p(\mathbf{t}|\mathbf{x})=\int p(\mathbf{t}|\mathbf{f})p(\mathbf{f}|\mathbf{x} )d\mathbf{f}, \tag{6}\]  
where \(\mathbf{f}=(f(\mathbf{x}_{1}),\ldots,\,f(\mathbf{x}_{n}))^{\text{T}}\) is latent variables. Considering noisy observations, the joint distribution of the observed target values \(\mathbf{t}\) and test outputs \(\mathbf{f}_{\text{s}}\) can be written as  
\[ \begin{bmatrix}t\\ \mathbf{f}_{\text{s}}\end{bmatrix} \ \sim\ \mathcal{N}\bigg{(}0,\ \begin{bmatrix}K( \mathbf{X},\mathbf{X})+\beta^{-1}\mathbf{I}&K(\mathbf{X},\mathbf{X}_{*})\\ K(\mathbf{X}_{*},\mathbf{X})&K(\mathbf{X}_{*},\mathbf{X}_{*})\end{bmatrix}  \bigg{)}, \tag{7}\]  
where \(K(X,X_{*})\) denotes the covariance matrix computed for all pairs of training data \(\mathbf{X}\) and test data \(\mathbf{X}_{*}\).