MLPKriging: Create an MLPKriging model (Deep Kernel Learning)

View source: R/MLPKrigingClass.R

MLPKrigingR Documentation

Create an MLPKriging model (Deep Kernel Learning)

Description

Kriging with a joint multi-layer perceptron applied to all inputs before the GP kernel is evaluated. The MLP weights, GP range parameters, variance and trend are jointly fitted by maximising the concentrated log-likelihood.

Usage

MLPKriging(
  y,
  X,
  hidden_dims,
  d_out = 2,
  activation = "selu",
  kernel = "gauss",
  regmodel = "constant",
  normalize = FALSE,
  optim = "BFGS+Adam",
  objective = "LL",
  parameters = NULL
)

Arguments

y

numeric vector of observations (n)

X

numeric matrix of inputs (n x d)

hidden_dims

integer vector of hidden layer sizes, e.g. c(32, 16)

d_out

output feature dimensionality (default 2)

activation

activation function: "relu", "selu", "tanh", "sigmoid", "elu"

kernel

covariance kernel: "gauss", "matern3_2", "matern5_2", "exp"

regmodel

trend: "constant", "linear", "quadratic"

normalize

logical; normalise inputs?

optim

optimiser (default "BFGS+Adam")

objective

"LL" (log-likelihood)

parameters

optional named list of tuning parameters, e.g. list(max_iter_adam = "300", adam_lr = "0.001", max_iter_bfgs = "50")

Value

An S3 object of class "MLPKriging".

Examples

X <- as.matrix(seq(0.01, 0.99, length.out = 10))
f <- function(x) 1 - 1/2 * (sin(12*x)/(1+x) + 2*cos(7*x)*x^5 + 0.7)
y <- f(X)
k <- MLPKriging(y, X, hidden_dims = c(16, 8), d_out = 2,
                activation = "selu", kernel = "gauss")
print(k)


rlibkriging documentation built on May 14, 2026, 1:06 a.m.