src.models.tsvgp_sites
¶
Module for the t-SVGP models with individual sites per data point.
Module Contents¶
- class t_SVGP_sites(data: gpflow.models.training_mixins.RegressionData, kernel, likelihood, inducing_variable, *, mean_function=None, num_latent_gps: int = 1, lambda_1=None, lambda_2=None, num_latent: Optional[int] = 1)[source]¶
Bases:
gpflow.models.GPModel
Class for the t-SVGP model with sites
kernel, likelihood, inducing_variables, mean_function are appropriate GPflow objects
num_latent_gps is the number of latent processes to use, defaults to 1
q_diag is a boolean. If True, the covariance is approximated by a diagonal matrix.
whiten is a boolean. If True, we use the whitened representation of the inducing points.
num_data is the total number of observations, defaults to X.shape[0] (relevant when feeding in external minibatches)
- _init_variational_parameters(self, num_inducing, lambda_1, lambda_2)[source]¶
Constructs the site parameters λ₁, Λ₂. for site t(u) = exp(uᵀλ₁ - ½ uᵀΛ₂u)
- Parameters
num_inducing – int Number of inducing variables, typically referred to as M.
lambda_1 – np.array or None First order natural parameter of the variational site.
lambda_2 – np.array or None Second order natural parameter of the variational site.
- get_mean_chol_cov_inducing_posterior(self)[source]¶
Computes the mean and cholesky factor of the posterior on the inducing variables q(u) = 𝓝(u; m, S) S = (K⁻¹ + Λ₂)⁻¹ = (K⁻¹ + L₂L₂ᵀ)⁻¹ = K - KL₂W⁻¹L₂ᵀK , W = (I + L₂ᵀKL₂)⁻¹ m = S λ₁