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(→ gpytorch.kernels.Kernel)

Return a scaled Matern kernel with specified output scale and lengthscale

gpytorch_mean_constant(→ gpytorch.means.Mean)

Return a constant mean function

gpytorch_likelihood_gaussian(...)

Return a Gaussian likelihood

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(outputscale: float, lengthscale: torch.Tensor, nu: float = 2.5, lengthscale_constraint: Union[gpytorch.constraints.Interval, None] = None) gpytorch.kernels.Kernel

Return a scaled Matern kernel with specified output scale and lengthscale

rapid_models.gp_models.utils.gpytorch_mean_constant(val: float, fixed: bool = True) gpytorch.means.Mean

Return a constant mean function

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

rapid_models.gp_models.utils.gpytorch_likelihood_gaussian(variance: float, variance_lb: float = 1e-06, fixed: bool = True) gpytorch.likelihoods.Likelihood

Return a Gaussian likelihood

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