HasGP-0.1: A Haskell library for inference using Gaussian processes

HasGP.Regression.Regression

Description

Regression is a module in the HasGP Gaussian process library. It implements basic Gaussian process regression. For the technical details see www.gaussianprocesses.org.

Copyright (C) 2011 Sean Holden. sbh11@cl.cam.ac.uk.

Synopsis

Documentation

gpRMainSource

Arguments

:: CovarianceFunction cF 
=> cF 
-> Double

The log noise variance

-> Inputs 
-> Targets 
-> (DMatrix, DVector)

L and alpha.

Compute the main quantities required to do regression, specifically: the Cholesky decomposition L of the covariance matrix, and the parameters alpha such that L L^t y = alpha.

gpRPredictSource

Arguments

:: CovarianceFunction cF 
=> cF 
-> DMatrix

l

-> DVector

alpha

-> Inputs 
-> Targets 
-> Inputs

The new inputs

-> (DVector, DVector)

Mean, variance

Compute the expected value and variance for a collection of new points supplied as the rows of a matrix. Differs from gpRPredict' as l and alpha need to be computed in advance.

gpRPredict'Source

Arguments

:: CovarianceFunction cF 
=> cF 
-> Double

The log noise variance

-> Inputs 
-> Targets 
-> Inputs

The new inputs

-> (DVector, DVector)

Mean, variance

Compute the expected value and variance for a collection of new points supplied as the rows of a matrix.

gpRLogEvidenceSource

Arguments

:: DMatrix

l

-> DVector

alpha

-> Targets 
-> Double

log marginal likelihood

Compute the log of the marginal likelihood.

gpRGradLogEvidenceSource

Arguments

:: CovarianceFunction cF 
=> cF 
-> Double

the log noise variance

-> DMatrix

l

-> DVector

alpha

-> Inputs 
-> DVector

Derivatives

Compute the gradient of the log marginal likelihood. Output contains derivative with respect to noise variance followed by the derivatives with respect to the hyperparameters in the covariance function.

gpRLogHyperToEvidenceSource

Arguments

:: CovarianceFunction cF 
=> cF 
-> Inputs 
-> Targets 
-> DVector

log hyperparameters, noise variance first

-> (Double, DVector) 

Given the log parameters and other necessary inputs, compute the NEGATIVE of the log marginal likelihood and its derivatives with respect to the LOG hyperparameters.