GaussianLikelihood<T>
Models & Types · AiDotNet.GaussianProcesses
Implements the Gaussian (Normal) likelihood for regression.
Implements: ILikelihood<T>
For Beginners
The Gaussian likelihood is the standard choice for regression. It assumes observations are the true function value plus Gaussian noise:
y = f(x) + ε, where ε ~ N(0, σ²)
This means:
- Errors are normally distributed
- Errors have constant variance (homoscedastic)
- Errors are independent
The noise variance σ² is a hyperparameter that:
- Large σ² → Smoother fit, more uncertainty
- Small σ² → Interpolates data more closely
Gaussian likelihood allows exact GP inference (no approximations needed).
Constructors
| Constructor | Summary |
|---|---|
GaussianLikelihood(double noiseVariance) |
Initializes a new Gaussian likelihood. |
Properties
| Property | Summary |
|---|---|
T NoiseVariance { get; } |
Gets the noise variance. |
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 predictive variance (adds noise variance to latent variance). |
T TransformMean(T f) |
For Gaussian likelihood, the mean is just f (identity transform). |
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. |