LaplaceApproximation: Use Laplace Approximation to Approximate mean & covariance

View source: R/gp_inference.R

LaplaceApproximationR Documentation

Use Laplace Approximation to Approximate mean & covariance

Description

LaplaceApproximation Approximates the latent posterior with a Gaussian distribution; it does so by finding the mode of the posterior, and using the Hessian (second order Taylor expansion) as an approximation of the covariance. Newton Raphson is used to find the mode of the posterior.

Pseudocode taken from Rasmussen and Williams, Chapter 3. This function outputs the mean and covariance of the approximated posterior. To actually generate samples from the latent posterior, generate samples from a multivariate normal with the parameters returned by this function.

@param Kn (matrix): the covariance matrix for the GP model @param class_labels (vector): +/- 1 values indicating the class labels of the data points

Usage

LaplaceApproximation(Kn, class_labels)

Value

params (list): list of the posterior mean and variances.


lcrawlab/SINATRA documentation built on Sept. 13, 2023, 2 p.m.