gpHist: gpHist function

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/gpHist.R

Description

This function is used to estimate the Gaussian Process regression

Usage

1
gpHist(X,Y,sigma,orders=NULL,alphas = NULL,k=1)

Arguments

X

Matrix of X values. Make sure that this is a matrix in the right dimension. It should be a NxD matrix. So that each row is one example of D dimensions.

Y

Matrix of Y values. Make sure that this is a matrix in the right dimension. Should be a 1xN matrix.

sigma

Noise in the data.

orders

If the correct orders of the samples in each dimension is already known, this can be used to avoid sorting of each dimension. If not set, order will be created and returned.

alphas

With this parameters the initial value of the alphas can be set. If not set, a random vector will be used. By setting the alpha vector the convergence can potentially be speed up.

k

The number of estimated eigenvalues and eigenvectors. This effects the approximation of the log-likelyhood and the predicted variance. It has no influence on the prediction of the mean of new sample values. Estimation of eigenvectors scales quadratically, so be awere of this additional runtime.

Details

This function will estimate the Gaussian process with HIK kernen using conjugate gradient descent and return all required estimates as lists. If only one eigenvector is estimated the power method will be used. For multible eigenvectors, Lanczos algorihm is applied. The eigenvalues will be bounded using sturm sequences and then estimatied using inverse iteration, wich also makes use of the conjugate gradient descent. Estimated time of multible eigenvectors greatly varies.

Value

If the functions fails or wrong parameters are provided NAN is returned.

Return value of the function is a List with following items:

logmarginal

Approximated log-likelihood of the GP

orders

Matrix that describes the ordering of each dimension

alpha

Estimatied alpha vector. alpha = K_xx^-1 y

lambda

Esimated eigenvalues

vectors

Estimated eigenvectors

Note

You need to keep the X data that you used for training because it is not saved within the returned GP object. In the future more parameters will be added to controll the internals of the function.

Author(s)

Dennis Becker

See Also

Package Overview: gpHist-Package

Function for prediction of new samples: gpHistPredict

Function for prediction of new sample variance: gpHistVariance

Function for hyperparameter estimation: estimateHyperParameters

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
require('gpHist')


testFn = function(x){
  y = sin(2*pi*x*2) 
}

#Get data
X = seq(0,1,0.01)
Y = testFn(X)

#Call gpHist function
gp_hist = gpHist(matrix(X),matrix(Y),sigma=0.01)

gpHist documentation built on Nov. 24, 2017, 5:03 p.m.