BayesianGPLVM<T>

Models & Types · AiDotNet.GaussianProcesses

Implements the Bayesian Gaussian Process Latent Variable Model (Bayesian GPLVM).

For Beginners

The Bayesian GPLVM is a powerful technique for dimensionality reduction and learning latent representations of data. Unlike PCA which finds linear projections, GPLVM finds nonlinear latent spaces using Gaussian Processes.

Key concepts:

  1. Latent Space: A lower-dimensional representation where data lives
  2. Mapping: A GP maps from latent space to observed data
  3. Uncertainty: We maintain uncertainty over both the mapping and the latent points

Applications:

  • Visualizing high-dimensional data (like t-SNE but probabilistic)
  • Finding meaningful low-dimensional representations
  • Handling missing data gracefully
  • Interpolating between data points

How It Works

Mathematical Background: The model assumes observed data Y is generated from latent points X through a GP: y_n = f(x_n) + ε, where f ~ GP(0, k)

The Bayesian approach places priors on the latent points X: p(X) = Π_n N(x_n | 0, I)

We use variational inference to approximate the posterior p(X|Y). The inducing points framework makes this scalable to large datasets.

Constructors

Constructor Summary
BayesianGPLVM(IKernelFunction<T> kernel, int latentDimensions, int numInducingPoints, double noiseVariance, double learningRate, int maxIterations) Initializes a new instance of the Bayesian GPLVM.

Properties

Property Summary
bool IsFitted { get; } Gets whether the model has been fitted.
int LatentDimensions { get; } Gets the latent dimension count.
int NumInducingPoints { get; } Gets the number of inducing points.

Methods

Method Summary
Matrix<T> GetLatentMean() Gets the learned latent representation (means).
Matrix<T> GetLatentVariance() Gets the learned latent representation (variances).
Matrix<T> Reconstruct(Matrix<T> latentPoints) Reconstructs data from latent representations.
Matrix<T> Transform(Matrix<T> newData) Transforms new data points into the latent space.
T ComputeELBO() Computes the ELBO (Evidence Lower BOund) for model comparison.
void Fit(Matrix<T> data) Fits the Bayesian GPLVM to observed data.