Learn R Programming

gplite (version 0.13.0)

gp_init: Initialize a GP model

Description

Initializes a GP model with given covariance function(s) and likelihood. The model can then be fitted using gp_fit. For hyperparameter optimization, see gp_optim

Usage

gp_init(
  cfs = cf_sexp(),
  lik = lik_gaussian(),
  method = method_full(),
  approx = approx_laplace()
)

Value

A GP model object that can be passed to other functions, for example when optimizing the hyperparameters or making predictions.

Arguments

cfs

The covariance function(s). Either a single covariance function or a list of them. See cf.

lik

Likelihood (observation model). See lik.

method

Method for approximating the covariance function. See method.

approx

Approximate inference method for Gaussian approximation for the posterior of the latent values. See approx.

References

Rasmussen, C. E. and Williams, C. K. I. (2006). Gaussian processes for machine learning. MIT Press.

Examples

Run this code

# Full exact GP with Gaussian likelihood
gp <- gp_init(
  cfs = cf_sexp(),
  lik = lik_gaussian(),
  method = method_full()
)

# Binary classification model with EP approximation for the latent values
# and FITC sparse approximation to facilitate large datasets
gp <- gp_init(
  cfs = cf_sexp(),
  lik = lik_bernoulli(),
  approx = approx_ep(),
  method = method_fitc(num_inducing = 100)
)


Run the code above in your browser using DataLab