mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-21 14:05:14 +02:00
rst "markup"
This commit is contained in:
parent
288d4fc140
commit
680fd29ba4
6 changed files with 51 additions and 42 deletions
|
|
@ -18,14 +18,11 @@ class GPKroneckerGaussianRegression(Model):
|
|||
|
||||
The noise must be iid Gaussian.
|
||||
|
||||
See Stegle et al.
|
||||
@inproceedings{stegle2011efficient,
|
||||
title={Efficient inference in matrix-variate gaussian models with $\\backslash$ iid observation noise},
|
||||
author={Stegle, Oliver and Lippert, Christoph and Mooij, Joris M and Lawrence, Neil D and Borgwardt, Karsten M},
|
||||
booktitle={Advances in Neural Information Processing Systems},
|
||||
pages={630--638},
|
||||
year={2011}
|
||||
}
|
||||
See [stegle_et_al_2011]_.
|
||||
|
||||
.. rubric:: References
|
||||
|
||||
.. [stegle_et_al_2011] Stegle, O.; Lippert, C.; Mooij, J.M.; Lawrence, N.D.; Borgwardt, K.:Efficient inference in matrix-variate Gaussian models with \iid observation noise. In: Advances in Neural Information Processing Systems, 2011, Pages 630-638
|
||||
|
||||
"""
|
||||
def __init__(self, X1, X2, Y, kern1, kern2, noise_var=1., name='KGPR'):
|
||||
|
|
|
|||
|
|
@ -15,9 +15,11 @@ class GPMultioutRegression(SparseGP):
|
|||
"""
|
||||
Gaussian Process model for multi-output regression without missing data
|
||||
|
||||
This is an implementation of Latent Variable Multiple Output Gaussian Processes (LVMOGP) in [Dai et al. 2017].
|
||||
This is an implementation of Latent Variable Multiple Output Gaussian Processes (LVMOGP) in [Dai_et_al_2017]_.
|
||||
|
||||
Zhenwen Dai, Mauricio A. Alvarez and Neil D. Lawrence. Efficient Modeling of Latent Information in Supervised Learning using Gaussian Processes. In NIPS, 2017.
|
||||
.. rubric:: References
|
||||
|
||||
.. [Dai_et_al_2017] Dai, Z.; Alvarez, M.A.; Lawrence, N.D: Efficient Modeling of Latent Information in Supervised Learning using Gaussian Processes. In NIPS, 2017.
|
||||
|
||||
:param X: input observations.
|
||||
:type X: numpy.ndarray
|
||||
|
|
@ -42,6 +44,7 @@ class GPMultioutRegression(SparseGP):
|
|||
:param int qU_var_c_W_dim: the dimensionality of the covariance of q(U) for the GP regression. If it is smaller than the number of inducing points, it represents a low-rank parameterization of the covariance matrix.
|
||||
:param str init: the choice of initialization: 'GP' or 'rand'. With 'rand', the model is initialized randomly. With 'GP', the model is initialized through a protocol as follows: (1) fits a sparse GP (2) fits a BGPLVM based on the outcome of sparse GP (3) initialize the model based on the outcome of the BGPLVM.
|
||||
:param str name: the name of the model
|
||||
|
||||
"""
|
||||
def __init__(self, X, Y, Xr_dim, kernel=None, kernel_row=None, Z=None, Z_row=None, X_row=None, Xvariance_row=None, num_inducing=(10,10), qU_var_r_W_dim=None, qU_var_c_W_dim=None, init='GP', name='GPMR'):
|
||||
|
||||
|
|
|
|||
|
|
@ -16,9 +16,11 @@ class GPMultioutRegressionMD(SparseGP):
|
|||
"""
|
||||
Gaussian Process model for multi-output regression with missing data
|
||||
|
||||
This is an implementation of Latent Variable Multiple Output Gaussian Processes (LVMOGP) in [Dai et al. 2017]. This model targets at the use case, in which each output dimension is observed at a different set of inputs. The model takes a different data format: the inputs and outputs observations of all the output dimensions are stacked together correspondingly into two matrices. An extra array is used to indicate the index of output dimension for each data point. The output dimensions are indexed using integers from 0 to D-1 assuming there are D output dimensions.
|
||||
This is an implementation of Latent Variable Multiple Output Gaussian Processes (LVMOGP) in [Dai_et_al_2017]_. This model targets at the use case, in which each output dimension is observed at a different set of inputs. The model takes a different data format: the inputs and outputs observations of all the output dimensions are stacked together correspondingly into two matrices. An extra array is used to indicate the index of output dimension for each data point. The output dimensions are indexed using integers from 0 to D-1 assuming there are D output dimensions.
|
||||
|
||||
Zhenwen Dai, Mauricio A. Alvarez and Neil D. Lawrence. Efficient Modeling of Latent Information in Supervised Learning using Gaussian Processes. In NIPS, 2017.
|
||||
.. rubric:: References
|
||||
|
||||
.. [Dai_et_al_2017] Dai, Z.; Alvarez, M.A.; Lawrence, N.D: Efficient Modeling of Latent Information in Supervised Learning using Gaussian Processes. In NIPS, 2017.
|
||||
|
||||
:param X: input observations.
|
||||
:type X: numpy.ndarray
|
||||
|
|
@ -46,6 +48,8 @@ class GPMultioutRegressionMD(SparseGP):
|
|||
:param str init: the choice of initialization: 'GP' or 'rand'. With 'rand', the model is initialized randomly. With 'GP', the model is initialized through a protocol as follows: (1) fits a sparse GP (2) fits a BGPLVM based on the outcome of sparse GP (3) initialize the model based on the outcome of the BGPLVM.
|
||||
:param boolean heter_noise: whether assuming heteroscedastic noise in the model, boolean
|
||||
:param str name: the name of the model
|
||||
|
||||
|
||||
"""
|
||||
def __init__(self, X, Y, indexD, Xr_dim, kernel=None, kernel_row=None, Z=None, Z_row=None, X_row=None, Xvariance_row=None, num_inducing=(10,10), qU_var_r_W_dim=None, qU_var_c_W_dim=None, init='GP', heter_noise=False, name='GPMRMD'):
|
||||
|
||||
|
|
|
|||
|
|
@ -13,13 +13,9 @@ class GPVariationalGaussianApproximation(GP):
|
|||
"""
|
||||
The Variational Gaussian Approximation revisited
|
||||
|
||||
@article{Opper:2009,
|
||||
title = {The Variational Gaussian Approximation Revisited},
|
||||
author = {Opper, Manfred and Archambeau, C{\'e}dric},
|
||||
journal = {Neural Comput.},
|
||||
year = {2009},
|
||||
pages = {786--792},
|
||||
}
|
||||
.. rubric:: References
|
||||
|
||||
.. [opper_archambeau_2009] Opper, M.; Archambeau, C.; The Variational Gaussian Approximation Revisited. Neural Comput. 2009, pages 786-792.
|
||||
"""
|
||||
def __init__(self, X, Y, kernel, likelihood, Y_metadata=None):
|
||||
|
||||
|
|
|
|||
|
|
@ -39,18 +39,20 @@ class GradientChecker(Model):
|
|||
a list of names with the same length is expected.
|
||||
:param args: Arguments passed as f(x, *args, **kwargs) and df(x, *args, **kwargs)
|
||||
|
||||
Examples:
|
||||
---------
|
||||
.. rubric:: Examples
|
||||
|
||||
Initialisation::
|
||||
|
||||
from GPy.models import GradientChecker
|
||||
N, M, Q = 10, 5, 3
|
||||
|
||||
Sinusoid:
|
||||
Sinusoid::
|
||||
|
||||
X = numpy.random.rand(N, Q)
|
||||
grad = GradientChecker(numpy.sin,numpy.cos,X,'x')
|
||||
grad.checkgrad(verbose=1)
|
||||
|
||||
Using GPy:
|
||||
Using GPy::
|
||||
|
||||
X, Z = numpy.random.randn(N,Q), numpy.random.randn(M,Q)
|
||||
kern = GPy.kern.linear(Q, ARD=True) + GPy.kern.rbf(Q, ARD=True)
|
||||
|
|
|
|||
|
|
@ -89,7 +89,8 @@ def plot_latent_scatter(self, labels=None,
|
|||
Plot a scatter plot of the latent space.
|
||||
|
||||
:param array-like labels: a label for each data point (row) of the inputs
|
||||
:param (int, int) which_indices: which input dimensions to plot against each other
|
||||
:param which_indices: which input dimensions to plot against each other
|
||||
:type which_indices: (int, int)
|
||||
:param bool legend: whether to plot the legend on the figure
|
||||
:param plot_limits: the plot limits for the plot
|
||||
:type plot_limits: (xmin, xmax, ymin, ymax) or ((xmin, xmax), (ymin, ymax))
|
||||
|
|
@ -174,7 +175,8 @@ def plot_magnification(self, labels=None, which_indices=None,
|
|||
density of the GP as a gray scale.
|
||||
|
||||
:param array-like labels: a label for each data point (row) of the inputs
|
||||
:param (int, int) which_indices: which input dimensions to plot against each other
|
||||
:param which_indices: which input dimensions to plot against each other
|
||||
:type which_indices: (int, int)
|
||||
:param int resolution: the resolution at which we predict the magnification factor
|
||||
:param str marker: markers to use - cycle if more labels then markers are given
|
||||
:param bool legend: whether to plot the legend on the figure
|
||||
|
|
@ -183,7 +185,8 @@ def plot_magnification(self, labels=None, which_indices=None,
|
|||
:param bool updates: if possible, make interactive updates using the specific library you are using
|
||||
:param bool mean: use the mean of the Wishart embedding for the magnification factor
|
||||
:param bool covariance: use the covariance of the Wishart embedding for the magnification factor
|
||||
:param :py:class:`~GPy.kern.Kern` kern: the kernel to use for prediction
|
||||
:param kern: the kernel to use for prediction
|
||||
:type kern: :py:class:`~GPy.kern.Kern`
|
||||
:param int num_samples: the number of samples to plot maximally. We do a stratified subsample from the labels, if the number of samples (in X) is higher then num_samples.
|
||||
:param imshow_kwargs: the kwargs for the imshow (magnification factor)
|
||||
:param kwargs: the kwargs for the scatter plots
|
||||
|
|
@ -248,13 +251,15 @@ def plot_latent(self, labels=None, which_indices=None,
|
|||
scatter plot of the input dimemsions selected by which_indices.
|
||||
|
||||
:param array-like labels: a label for each data point (row) of the inputs
|
||||
:param (int, int) which_indices: which input dimensions to plot against each other
|
||||
:param which_indices: which input dimensions to plot against each other
|
||||
:type which_indices: (int, int)
|
||||
:param int resolution: the resolution at which we predict the magnification factor
|
||||
:param bool legend: whether to plot the legend on the figure
|
||||
:param plot_limits: the plot limits for the plot
|
||||
:type plot_limits: (xmin, xmax, ymin, ymax) or ((xmin, xmax), (ymin, ymax))
|
||||
:param bool updates: if possible, make interactive updates using the specific library you are using
|
||||
:param :py:class:`~GPy.kern.Kern` kern: the kernel to use for prediction
|
||||
:param kern: the kernel to use for prediction
|
||||
:type kern: :py:class:`~GPy.kern.Kern`
|
||||
:param str marker: markers to use - cycle if more labels then markers are given
|
||||
:param int num_samples: the number of samples to plot maximally. We do a stratified subsample from the labels, if the number of samples (in X) is higher then num_samples.
|
||||
:param imshow_kwargs: the kwargs for the imshow (magnification factor)
|
||||
|
|
@ -316,13 +321,15 @@ def plot_steepest_gradient_map(self, output_labels=None, data_labels=None, which
|
|||
scatter plot of the input dimemsions selected by which_indices.
|
||||
|
||||
:param array-like labels: a label for each data point (row) of the inputs
|
||||
:param (int, int) which_indices: which input dimensions to plot against each other
|
||||
:param which_indices: which input dimensions to plot against each other
|
||||
:type which_indices: (int, int)
|
||||
:param int resolution: the resolution at which we predict the magnification factor
|
||||
:param bool legend: whether to plot the legend on the figure, if int plot legend columns on legend
|
||||
:param plot_limits: the plot limits for the plot
|
||||
:type plot_limits: (xmin, xmax, ymin, ymax) or ((xmin, xmax), (ymin, ymax))
|
||||
:param bool updates: if possible, make interactive updates using the specific library you are using
|
||||
:param :py:class:`~GPy.kern.Kern` kern: the kernel to use for prediction
|
||||
:param kern: the kernel to use for prediction
|
||||
:type kern: :py:class:`~GPy.kern.Kern`
|
||||
:param str marker: markers to use - cycle if more labels then markers are given
|
||||
:param int num_samples: the number of samples to plot maximally. We do a stratified subsample from the labels, if the number of samples (in X) is higher then num_samples.
|
||||
:param imshow_kwargs: the kwargs for the imshow (magnification factor)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue