美文网首页机器学习
GPflow解读—概述

GPflow解读—概述

作者: 我就爱思考 | 来源:发表于2018-07-04 20:17 被阅读3次

    什么是GPflow

    GPflow是一个高斯过程的工具包,接口部分由python实现,内部的部分计算则由TensorFlow实现。

    主要特点有二个:一是使用变分推理作为近似方法,二是使用自动微分进行求导。

    安装

    首先到GPflow官方页面将代码包下载到本地,然后进入代码包根目录,在终端输入pip install . 即可安装。

    GPy 与 GPflow之间的区别

    GPflow很多核心的类和方法都参考了GPy,不过GPflow使用TensorFlow使得代码及其简洁!

    • GPflow 利用 TensorFlow 使得计算更快,适合更复杂的运算。
    • GPflow 代码量比 GPy 少的多,因为使用 TensorFlow。
    • GPflow 的推理部分实现了变分推理(VI)和MCMC,没有实现期望传播(EP)和拉普拉斯近似(Laplace approximation)。
    • GPflow 没有支持画图模块。

    GPflow的模块

    • GPflow.models模块实现了主要的GP模型。
    • Regression: GPflow支持高斯回归。对于噪音为高斯过程的情况,即最普通的高斯回归,在推理阶段可以直接通过解析表达式求p(f_\ast | \bm{x}_\ast, \bm{X}, \bm{y}),实现见gpflow.models.GPR。GPflow也支持稀疏高斯回归,实现见gpflow.models.SGPR
    • Variational inference: 通过变分推理方法,我们可以用高斯分布来估计隐函数f的后验分布p(f|X,y),实现见 [2] gpflow.models.VGP,[3] gpflow.models.SVGP
    • MCMC: 通过MCMC,我们可以对p(f,\theta|X,y)采样,然后求平均得到最终预测值p(f_\ast | \bm{x}_\ast, \bm{X}, \bm{y})。实现见gpflow.models.GPMCgpflow.models.SGPMC
    • GPflow.params模块是GPflow的基石之一。
    • Parameter用来存储GP模型的各种参数,如协方差函数的length-scale参数。
    • Parameterized中存储了各种Parameter,也定义了在这些Parameter节点上的一系列运算。各种先验分布,协方差函数,GP模型都继承 了Parameterized类。
    • GPflow.core模块是关于tensorflow、自动求导等内容的。

    最后,[Matthews(http://mlg.eng.cam.ac.uk/matthews/thesis.pdf) 的博士论文[8]系统阐述了以上内容,作为更详细的参考。

    参考文献

    [1] MCMC for Variationally Sparse Gaussian Processes J Hensman, A G de G Matthews, M Filippone, Z Ghahramani Advances in Neural Information Processing Systems, 1639-1647, 2015.

    [2] The variational Gaussian approximation revisited M Opper, C Archambeau Neural computation 21 (3), 786-792, 2009.

    [3] Scalable Variational Gaussian Process Classification J Hensman, A G de G Matthews, Z Ghahramani Proceedings of AISTATS 18, 2015.

    [4] Variational Learning of Inducing Variables in Sparse Gaussian Processes. M Titsias Proceedings of AISTATS 12, 2009.

    [5] On Sparse variational methods and the Kullback-Leibler divergence between stochastic processes A G de G Matthews, J Hensman, R E Turner, Z Ghahramani Proceedings of AISTATS 19, 2016.

    [6] Gaussian process latent variable models for visualisation of high dimensional data. Lawrence, Neil D. Advances in Neural Information Processing Systems, 329-336, 2004.

    [7] Bayesian Gaussian Process Latent Variable Model. Titsias, Michalis K., and Neil D. Lawrence. Proceedings of AISTATS, 2010.

    [8] Scalable Gaussian process inference using variational methods. Alexander G. de G. Matthews. PhD Thesis. University of Cambridge, 2016.

    相关文章

      网友评论

        本文标题:GPflow解读—概述

        本文链接:https://www.haomeiwen.com/subject/fplyuftx.html