rapid_models.gp_models.templates

Module Contents

Classes

ExactGPModel

Model for standard GP regression

class rapid_models.gp_models.templates.ExactGPModel(train_x, train_y, mean_module, covar_module, likelihood, path, name)

Bases: gpytorch.models.ExactGP

Model for standard GP regression

forward(self, x)
eval_mode(self)

Set model in evaluation mode

train_mode(self)

Set in training mode

predict(self, x, latent=True, CG_tol=0.1, full_cov=False)

Return mean and covariance at x

Input: x - tensor of size dim * N containing N inputs latent - latent = True -> using latent GP

latent = False -> using observed GP (incl. likelihood)

CG_tol - Conjugate Gradient tolerance for evaluation full_cov - full_cov = False -> Return only diagonal (variances)

Output: mean and covariance

print_parameters(self)

Print actual (not raw) parameters

save(self)

Save GP model parameters to self.path

load(self)

Load GP model parameters from self.path