ILikelihood<T>

Interfaces · AiDotNet.GaussianProcesses

Interface for likelihood functions in Gaussian Processes.

Known implementations: BernoulliLikelihood<T>, GaussianLikelihood<T>, PoissonLikelihood<T>, StudentTLikelihood<T>

For Beginners

A likelihood function describes how observed data y relates to the underlying GP function value f. It models the “noise” or observation process.

Common likelihoods:

  • Gaussian: y = f + ε, where ε ~ N(0, σ²) - for regression
  • Bernoulli: y ~ Bernoulli(sigmoid(f)) - for binary classification
  • Poisson: y ~ Poisson(exp(f)) - for count data

The likelihood affects:

  • How we interpret the GP output
  • What inference method we need (exact vs approximate)
  • What kind of predictions we can make

Properties

Property Summary
string Name { get; } Gets the name of this likelihood.

Methods

Method Summary
T LogLikelihood(Vector<T> y, Vector<T> f) Computes the log-likelihood of observations given latent function values.
T PredictiveVariance(T fMean, T fVariance) Computes the predictive variance given latent mean and variance.
T TransformMean(T f) Transforms latent function values to the expected observation value.
Vector<T> LogLikelihoodGradient(Vector<T> y, Vector<T> f) Computes the gradient of the log-likelihood with respect to f.
Vector<T> LogLikelihoodHessianDiag(Vector<T> y, Vector<T> f) Computes the Hessian diagonal of the log-likelihood with respect to f.