This function is used to estimate the Gaussian Process regression
gpHist(X,Y,sigma,orders=NULL,alphas = NULL,k=1)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.
Matrix of Y values. Make sure that this is a matrix in the right dimension. Should be a 1xN matrix.
Noise in the data.
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.
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.
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.
If the functions fails or wrong parameters are provided NAN is returned.
Return value of the function is a List with following items:
Approximated log-likelihood of the GP
Matrix that describes the ordering of each dimension
Estimatied alpha vector. alpha = K_xx^-1 y
Esimated eigenvalues
Estimated eigenvectors
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.
Package Overview:
gpHist-Package
Function for prediction of new samples:
gpHistPredict
Function for prediction of new sample variance:
gpHistVariance
Function for hyperparameter estimation:
estimateHyperParameters
# NOT RUN {
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)
# }
Run the code above in your browser using DataLab