/** Supported covariance kernels. */ export type GPKernel = 'rbf' | 'matern32' | 'matern52'; /** Options for {@link gaussianProcessRegression}. */ export interface GPOptions { /** Covariance kernel. Default `'rbf'` (squared-exponential). */ kernel?: GPKernel; /** Kernel length-scale ℓ (> 0). Default `1`. */ lengthScale?: number; /** Signal variance σ_f² (kernel amplitude, > 0). Default `1`. */ signalVariance?: number; /** I.i.d. Gaussian noise variance α added to the diagonal (≥ 0). Default `1e-10`. */ noise?: number; } /** Posterior prediction at a set of test points. */ export interface GPPrediction { /** Posterior mean at each test point. */ mean: number[]; /** Posterior variance at each test point (≥ 0). */ variance: number[]; /** Posterior standard deviation at each test point (= √variance). */ std: number[]; } /** A fitted Gaussian-process regressor. */ export interface GPModel { /** Predict the posterior mean/variance/std at the given test points. */ predict(Xstar: readonly (readonly number[])[]): GPPrediction; /** Log marginal likelihood log p(y | X) of the training data under the prior. */ logMarginalLikelihood: number; /** The resolved kernel name. */ kernel: GPKernel; } /** * Fit a Gaussian-process regressor to training points `X` (array of * length-d feature vectors) and targets `y`, then return a model exposing * `.predict(Xstar)` (posterior mean/variance/std) and the log marginal * likelihood. * * @example * const gp = gaussianProcessRegression( * [[-4], [-3], [-1], [0], [2]], * [-2, 0, 1, 2, -1], * { kernel: 'rbf', lengthScale: 1.2, signalVariance: 1.5, noise: 1e-2 } * ); * gp.predict([[-0.5], [10]]); // mean ≈ [1.5872, ~0], std ≈ [0.1453, 1.2247] */ export declare function gaussianProcessRegression(X: readonly (readonly number[])[], y: readonly number[], options?: GPOptions): GPModel; /** Alias of {@link gaussianProcessRegression}. */ export declare const gpRegression: typeof gaussianProcessRegression; //# sourceMappingURL=gaussian-process.d.ts.map