rapid_models.gp_models.utils

Module Contents

Functions

optim_step(model, loss_function, optimizer)

Return current loss and perform one optimization step

gpytorch_kernel_Matern(var, ls, nu=2.5)

Return a Matern kernel with specified kernel variance (var) and lengthscales (ls)

gpytorch_mean_constant(val, fixed=True)

Return a constant mean function

gpytorch_likelihood_gaussian(variance, variance_lb=1e-06, fixed=True)

Return a Gaussian likelihood

scale_x_to_box(x, bounds)

Input x = points in [0, 1]^n

scale_x_to_box_inv(x, bounds)

Inverse of scale_x_to_box

rapid_models.gp_models.utils.optim_step(model, loss_function, optimizer)

Return current loss and perform one optimization step

rapid_models.gp_models.utils.gpytorch_kernel_Matern(var, ls, nu=2.5)

Return a Matern kernel with specified kernel variance (var) and lengthscales (ls)

rapid_models.gp_models.utils.gpytorch_mean_constant(val, fixed=True)

Return a constant mean function

fixed = True -> Do not update mean function during training

rapid_models.gp_models.utils.gpytorch_likelihood_gaussian(variance, variance_lb=1e-06, fixed=True)

Return a Gaussian likelihood

fixed = True -> Do not update during training variance_lb = lower bound

rapid_models.gp_models.utils.scale_x_to_box(x, bounds)

Input x = points in [0, 1]^n output scaled to lie in the box given by bounds

rapid_models.gp_models.utils.scale_x_to_box_inv(x, bounds)

Inverse of scale_x_to_box