GaussianProcessModel

class GaussianProcessModel @JvmOverloads constructor(val problemDefinition: ProblemDefinition, var kernel: StationaryKernel = RBFKernel(problemDefinition), var constantMean: Double? = null, jitter: Double = defaultJitter) : SurrogateModelIfc(source)

A Gaussian-process (GP) regression surrogate with per-point observation noise, suitable for the stochastic simulation setting: each observed point carries its own noise variance (the variance of the estimated mean). The GP uses a constant prior mean (the data mean by default) and a StationaryKernel.

The fit forms the covariance matrix K + diag(noiseVar) + jitter*I, factorizes it with a Cholesky decomposition (Hipparchus, already on the classpath), and caches the weight vector and the inverse for prediction. If the matrix is not numerically positive definite, the jitter is escalated and the fit retried.

Parameters

problemDefinition

the problem definition (used for default kernel length scales)

kernel

the covariance kernel. Defaults to an RBFKernel with ARD length scales set to the problem's input ranges.

constantMean

the constant prior mean. When null (the default), the mean of the observed responses is used (ordinary kriging).

jitter

a small positive value added to the diagonal for numerical stability. Defaults to defaultJitter.

Constructors

Link copied to clipboard
constructor(problemDefinition: ProblemDefinition, kernel: StationaryKernel = RBFKernel(problemDefinition), constantMean: Double? = null, jitter: Double = defaultJitter)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

Whether the model has been successfully fit.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun fit(points: List<DoubleArray>, means: DoubleArray, noiseVars: DoubleArray)

Fits the surrogate to the supplied observations.

Link copied to clipboard

The log marginal likelihood of the current fit, used for hyperparameter selection: -0.5 (y-m)^T K^{-1} (y-m) - 0.5 log|K| - (n/2) log(2π).

Link copied to clipboard

Predicts the posterior mean and variance at x. The model must have been fit first.

Link copied to clipboard
open override fun toString(): String