> For the complete documentation index, see [llms.txt](https://json007.gitbook.io/svm/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://json007.gitbook.io/svm/math-probability/gaussian_process.md).

# Gaussian  Process

## 高斯过程回归预测

如同Dirichlet过程采样产生的都是符合Dirichlet分布，高斯过程采样产生的都是符合高斯分布，即：$$p(y) = \mathcal{N}(y|0,K)$$ 。

假设真实的target符合：​$$t\_n = y\_n + \epsilon$$ 。

$$\epsilon$$是随机噪声变量，且对于每个观测n都是独立的，假设服从高斯分布，则：

$$
p(t\_n|y\_n) = \mathcal{N}(t\_n|y\_n,\beta^{-1})  \\
p(t|y) = \mathcal{N}(t|y,\beta^{-1}I\_N)
$$

则$$p(t)$$的边缘分布$$p(t) = \int p(t|y)p(y)dy = \mathcal{N}(t|O,C)$$。\
其中协方差矩阵C的元素为：$$C(x\_n,x\_m) = k(x\_n,x\_m) + \beta^{-1}\delta\_{nm}$$ 。

这个结果反映了下面的事实：两个随机的高斯分布（即与$$y(x)$$相关的和与$$\epsilon$$相关的高斯分布）是独立的，因此它们的协方差可以简单地相加。

广泛选择的核函数：$$k(x\_n,x\_m) = \theta\_0exp\left{-\frac{\theta\_1}{2}\Vert x\_n - x\_m \Vert^2\right} + \theta\_2 + \theta\_3x\_n^Tx\_m$$

现在假设有N个训练集，并且要预测第N+1个数据x对于的y。\
先求n+1联合分布：$$p(t\_{N+1}) = \mathcal{N}(t\_{N+1}|O,C\_{N+1})$$\
将协方差矩阵分块：$$\begin{eqnarray} C\_{N+1} = \left( \begin{array}{cc} C\_N & k \ k^T & c \end{array} \right) \end{eqnarray}$$ , 则可以得到 $$P(t\_{N+1}|t)$$ 的均值和协方差分别为：

$$
\begin{eqnarray}
m(x\_{N+1}) &=& k^TC\_N^{-1}t  \\
\sigma^2(x\_{N+1}) &=& c - k^TC\_N^{-1}k
\end{eqnarray}
$$

最后得到：$$p(x\_{N+1}) = N(x\_{N+1} | k^T C\_N^{-1} t,c-k^T C\_N^{-1} k)$$ 。

![](/files/-M7DeS7ctI97Lauj7cZr)

高斯过程和很多模型是等价的：ARMA (autoregressive moving average) models, Kalman filters, radial basis function networks 。

多维高斯分布由均值（向量）和协方差（矩阵）决定，那么高斯过程的均值和协方差由mean function和covariance function决定。形式如下：$$f \sim gp(m(x),k(x,x^\*))$$

对于任意时刻$$t\_i$$，高斯过程的任意n维随机变量$$X(t\_i)$$都服从高斯分布，那么就可以用来做贝叶斯推断的先验（一些模型都会增加正太分布先验（L2正则项）），这样就可以**非参数贝叶斯估计**。

## 参考佳文

[拟合目标函数后验分布的调参利器：贝叶斯优化](https://mp.weixin.qq.com/s/AsZyjwUclEoxxl2VRBekHA)

<https://www.zhihu.com/question/54354940>

[什么是Gaussian process? —— 说说高斯过程与高斯分布的关系](https://zhuanlan.zhihu.com/p/27555501)

[Gaussian process regression的导出——权重空间视角下的贝叶斯的方法](https://zhuanlan.zhihu.com/p/27554656)

[高斯过程初探](http://blog.jasonding.top/2015/11/13/Machine%20Learning/【机器学习技术】高斯过程初探/)\
[说说高斯过程回归](http://www.52cs.org/?p=509) 需梯子， [说说高斯过程回归](http://www.kuqin.com/shuoit/20150508/345958.html)\
[高斯过程-线性回归](https://mqshen.gitbooks.io/prml/content/Chapter6/gaussian/linear_regression_revisited.html)\
[高斯过程回归](https://mqshen.gitbooks.io/prml/content/Chapter6/gaussian/gaussian_processes_regression.html)\
[A Python implementation of global optimization with gaussian processes.](https://github.com/fmfn/BayesianOptimization/)

[高斯过程的模拟/采样/生成](http://blog.csdn.net/shenxiaolu1984/article/details/50386518)

[如何通俗易懂地介绍 Gaussian Process？](https://www.zhihu.com/question/46631426)

[Small tutorial on using Gaussian processes for Bayesian optimization](https://github.com/MichielStock/Teaching/tree/master/BayesianOptimization)

[Gaussian Process and Uncertainty Quantification Summer School, 2017](http://gpss.cc/gpss17/program)

[Gaussian process 的重要组成部分——关于那个被广泛应用的Kernel的零零总总](https://zhuanlan.zhihu.com/p/35396322)
