get_gaussian_process_posterior_distribution - Gets the mean and covariance for the posterior of a Gaussian process
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
const Vector_vector *train_indices,
const Vector_vector *train_data,
int (*cov_func)(Matrix **,const Vector *,const Vector *,const void *,int),
const void *hyper_params
This routine gives the mean vector (in mu) and covariance matrix (in sigma) of
the posterior distribution of a Gaussian process with covariance function
cov_func, and whose training data train_data exists at indices train_indices.
Finally, the (Gaussian) noise has variance noise_sigma. mu will have dimension
train_indices->length * train_data->elements->length,
and sigma will be a square matrix of the same dimension.
Naturally, the vectors of train_indices must all be of equal length, as must
the vectors of train_data, and cov_func must return square matrix of dimension d.
It's worth noting that the mean of the posterior is the MAP estimate of the GP.
If the vector pointed to by mu is NULL, then a vector of the appropriate size
is created. If it exists, but is the wrong size, then it is recreated. Otherwise,
the storage is recycled. The same goes for the matrix pointed to by sigma.
If the routine fails (due to storage allocation, an error in the
covariance function, or a mismatch in the sizes of the indices), then ERROR
is returned with and error message being set. Otherwise NO_ERROR is returned.
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.