DeepGaussianProcess<T>
Models & Types · AiDotNet.GaussianProcesses
Implements a Deep Gaussian Process (DGP) with multiple stacked GP layers.
Inheritance: ModelBase<T, Matrix<T>, Vector<T>> → GaussianProcessBase<T> → DeepGaussianProcess<T>
Implements: IGeneratedParameterRegistrar<T>
For Beginners
A Deep Gaussian Process stacks multiple GP layers on top of each other, similar to how deep neural networks stack layers. This allows the model to learn hierarchical representations and capture more complex patterns than a single GP.
How it works:
- Input goes into the first GP layer
- Output of layer 1 becomes input to layer 2
- Continue through all layers
- Final layer produces the prediction
Each layer can transform the data in different ways, allowing the model to learn progressively more abstract representations.
How It Works
Why use Deep GPs?
-
Complex patterns: Can model highly non-linear relationships that single GPs struggle with
-
Hierarchical features: Learn abstract representations at different levels
-
Uncertainty propagation: Unlike deep neural networks, DGPs propagate uncertainty
through all layers, giving more reliable confidence estimates
- Flexible architecture: Can use different kernels at each layer
Limitations:
- More computationally expensive than single GPs
- Harder to train (requires careful initialization and optimization)
- May overfit on small datasets
Implementation Note: This is an experimental/research implementation with simplified layer optimization. The current training uses a greedy layer-by-layer approach rather than full ELBO gradient optimization. For production use cases requiring state-of-the-art DGP performance, consider using specialized DGP libraries or extending this implementation with proper doubly-stochastic variational inference.
Constructors
| Constructor | Summary |
|---|---|
DeepGaussianProcess(IKernelFunction<T> kernel, int numLayers, int hiddenWidth, int numInducingPoints, MatrixDecompositionType decompositionType) |
Initializes a Deep Gaussian Process with a simple architecture. |
DeepGaussianProcess(IKernelFunction<T>[] layerKernels, int[] layerWidths, int numInducingPoints, double learningRate, int maxIterations, int numSamples, MatrixDecompositionType decompositionType) |
Initializes a new Deep Gaussian Process with specified layer configurations. |
Properties
| Property | Summary |
|---|---|
int NumLayers { get; } |
Gets the number of layers in the deep GP. |
Methods
| Method | Summary |
|---|---|
ValueTuple<T, T> Predict(Vector<T> x) |
|
void Fit(Matrix<T> X, Vector<T> y) |
Trains the Deep GP using variational inference. |
void UpdateKernel(IKernelFunction<T> kernel) |