Core model

class GrandPrix.GrandPrixModel.GrandPrixModel(data, n_latent_dims=1, n_inducing_points=10, kernel={'name': 'RBF', 'ls': 1.0, 'var': 1.0}, mData=None, latent_prior_mean=None, latent_prior_var=1.0, latent_mean=None, latent_var=0.1, inducing_inputs=None, dtype='float64')
Parameters:

data : array-like, shape N x D

Observed data, where N is the number of samples and D is the number of features.

n_latent_dims : int, optional (default: 1)

Number of latent dimentions to compute.

n_inducing_points : int, optional (default: 10)

Number of inducing or auxiliary points.

kernel : gpflow.kernels object, optional (default: RBF kernel with lengthscale and variance set to 1.0)

Kernel functions are used to compute the covariance among datapoints. They impose constraints such as smoothness, periodicity on the function being learned that is shared by all datapoints. Kernels are parameterize by a set of hyperparameters, i.e. lengthscale, variance, etc which can be optimized during model fitting.

latent_prior_mean : array-like, shape N x n_latent_dims, optional (default: 0)

Mean of the prior distribution over the latent dimensions.

latent_prior_var : array-like, shape N x n_latent_dims, optional (default: 1.)

Variance of the prior distribution over the latent dimensions.

latent_mean : array-like, shape N x n_latent_dims, optional (default: PCA)

Initial mean values of the distribution over the latent dimensions.

latent_var : array-like, shape N x n_latent_dims, optional (default: 0.1)

Initial variance of the distribution over the latent dimensions.

inducing_inputs : array-like, shape n_inducing_points x n_latent_dims, optional (default: random subset from laten_mean)

Set of inducing or auxiliary input points.

dtype : str, optional (default: ‘float64’)

Floating point data type precision to be used.

Methods

build()

Build the model into a Tensorflow graph.

fit(maxiter=1000, display=False)

Fit the BGPLVM model.

Parameters:

maxiter : int, optional (default: 1000)

Maximum number of iterations to perform.

display : bool, optional (default: False)

If set to True, print convergence messages.

get_latent_dims()

Get predictive distribuiton over latent dimensions of the Gaussian Process Latent Variable Model.

Returns:

latent_mean : array-like, shape N x n_latent_dims

Mean values of the predictive distribution over the latent dimensions.

latent_var : array-like, shape N x n_latent_dims

Variance of the predictive distribution over the latent dimensions.

predict(Xnew)

Predict posterior mean and variance using the BGPLVM. The prediction can also be done on the unfitted model using the Gaussian Process prior.

Parameters:

Xnew : array-like, shape n_sample x n_latent_dims

n_sample is the number of query points where the prediction will be evaluated.

Returns:

data_mean : array-like, shape N x D

Mean values of the predictive distribution at the query points.

data_var : array-like, shape N x D

Variance of the predictive distribution at the query points.

set_trainable(paramlist=None)

Fix model (auxiliary) parameters and hyperparameters.

Parameters:

paramlist : list, optional (default: None)

:param paramlist:

:return: