NAME
fill_mean_vector - Fills a mean vector for a Gaussian process
SYNOPSIS
#include "gp/gp_gaussian_processes.h"
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-I/home/kobus/include
-L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
int fill_mean_vector
(
Vector **mean,
const Vector_vector *indices,
int (*mean_func)(Vector **,const Vector *,int),
int d
);
DESCRIPTION
This routine creates a mean vector for a Gaussian process where the dimension
of the indices is given by the dimension of the vectors of indices, and the
dimension of the variables is d. Then, it fills *mean with subvectors that are
the result of calling the given mean function for that index.
For example, the subvector of *mean of elements 0,1,...,d is v, where v is the
vector gotten in the call
mean_func(&v, indices->elements[0], d).
Naturally, all of the vectors of indices must have equal lengths. Also,
mean_func must "return" d-vector (there are some predefined mean functions in
the library). If the routine succeeds, mean will be of length
indices->elements[0]->length * d.
If the vector pointed to by mean 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.
RETURNS
If the routine fails (due to storage allocation or an error in the mean
function), then ERROR is returned with and error message being set. Otherwise
NO_ERROR is returned.
RELATED
zero_mean_vector
DISCLAIMER
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
AUTHOR
Ernesto Brau
DOCUMENTER
Ernesto Brau
SEE ALSO
fill_covariance_matrix
,
sample_from_gaussian_process_prior
,
sample_from_gaussian_process_prior_i
,
sample_from_gaussian_process_predictive
,
sample_from_gaussian_process_predictive_i
,
get_gaussian_process_predictive_distribution
,
get_gaussian_process_predictive_distribution_i
,
get_gaussian_process_posterior_distribution
,
get_gaussian_process_posterior_distribution_i
,
compute_gaussian_process_likelihood
,
compute_gaussian_process_likelihood_i
,
compute_gaussian_process_marginal_likelihood
,
compute_gaussian_process_marginal_likelihood_i
,
compute_gaussian_process_marginal_log_likelihood
,
compute_gaussian_process_marginal_log_likelihood_i