UQTk: Uncertainty Quantification Toolkit 3.1.5
|
Class for Gaussian processes. More...
#include <gproc.h>
Public Member Functions | |
Gproc (const string covtype, PCSet *PCModel, Array1D< double > ¶m) | |
Constructor: initialize with covariance type, trend function basis and roughness parameter vector. | |
~Gproc () | |
Destructor: cleans up all memory and destroys object. | |
void | SetupPrior () |
Setup the prior. | |
void | SetupData (Array2D< double > &xdata, Array1D< double > &ydata, Array1D< double > &datavar) |
Setup the data. | |
void | setCorrParam (Array1D< double > param) |
Set the roughness parameter vector. | |
void | BuildGP () |
Build Gaussian Process regressor, i.e. compute internally all necessary matrices and vectors that describe the posterior GP. | |
void | BuildGP_inv () |
Build Gaussian Process regressor, i.e. compute internally all necessary matrices and vectors that describe the posterior GP. | |
void | EvalGP (Array2D< double > &xgrid, string msc, Array1D< double > &mst) |
Evaluate the Gaussian Process at a given grid msc controls whether only mean will be computed, or standard devation and covariance as well. | |
void | EvalGP_inv (Array2D< double > &xgrid, string msc, Array1D< double > &mst) |
Evaluate the Gaussian Process at a given grid msc controls whether only mean will be computed, or standard devation and covariance as well. | |
int | getNpt () const |
Get the number of data points. | |
int | getNdim () const |
Get the dimensionality. | |
int | getNPC () const |
Get the number of basis terms in the trend. | |
double | getAl () const |
Get alpha parameter. | |
double | getBe () const |
Get beta parameter. | |
double | getSig2hat () const |
Get Sigma-hat-squared, i.e. the posterior variance factor. | |
void | getVst (Array2D< double > &vst) |
Get , an auxiliary matrix. | |
void | getA (Array2D< double > &acor) |
Get the correlation matrix . | |
void | getParam (Array1D< double > ¶m) |
Get the roughness parameters. | |
void | getCov (Array2D< double > &cov) |
Get the posterior covariance matrix. | |
void | getVar (Array1D< double > &var) |
Get the posterior variance vector. | |
void | getXYCov (Array2D< double > &xgrid, Array2D< double > &xycov) |
Get the covariance in a different format, with the x,x' values. | |
void | getSttPars (Array1D< double > &sttmat) |
Get the Student-t parameters. | |
void | findBestCorrParam () |
Function to find the best values for roughness parameters. | |
Private Member Functions | |
double | covariance (Array1D< double > &x1, Array1D< double > &x2, Array1D< double > ¶m) |
Prior covariance function. | |
void | computeDataCov_ (Array2D< double > &xdata, Array1D< double > ¶m, Array2D< double > &A) |
Compute the data covariance . | |
Private Attributes | |
Array2D< double > | xdata_ |
xdata array | |
Array1D< double > | ydata_ |
ydata array | |
Array1D< double > | dataVar_ |
Data noise 'nugget'. | |
int | npc_ |
Number of bases in the mean trend. | |
Array2D< double > | Vinv_ |
Inverse of the mean trend coefficient prior covariance. | |
Array1D< double > | z_ |
Prior mean of the mean trend. | |
double | al_ |
Prior parameter . | |
double | be_ |
Prior parameter . | |
double | sig2hat_ |
Posterior variance factor. | |
int | npt_ |
Number of data points. | |
int | ndim_ |
Dimensionality. | |
string | covType_ |
Covariance type, only 'SqExp' implemented so far. | |
PCSet * | PCModel_ |
Basis set for the trend function. | |
Array1D< double > | mst_ |
Mean of the Student-t posterior. | |
Array1D< double > | var_ |
Variance of the Student-t posterior. | |
Array2D< double > | cov_ |
Covariance of the Student-t posterior. | |
Array1D< double > | param_ |
Roughness parameter vector. | |
Array2D< double > | H_ |
Auxiliary matrices or vectors, see the UQTk Manual. | |
Array2D< double > | Ht_ |
Array2D< double > | A_ |
Array2D< double > | Ainv_ |
Array1D< double > | Ainvd_ |
Array1D< double > | Vinvz_ |
Array1D< double > | HtAinvd_ |
Array2D< double > | AinvH_ |
Array2D< double > | HtAinvH_ |
Array2D< double > | Vst_ |
Array1D< double > | bhat_ |
Array1D< double > | Hbhat_ |
Array1D< double > | yHbhat_ |
Array1D< double > | AinvyHbhat_ |
Array2D< double > | Vstinv_ |
Class for Gaussian processes.
Constructor: initialize with covariance type, trend function basis and roughness parameter vector.
|
inline |
Destructor: cleans up all memory and destroys object.
void Gproc::BuildGP | ( | ) |
Build Gaussian Process regressor, i.e. compute internally all necessary matrices and vectors that describe the posterior GP.
void Gproc::BuildGP_inv | ( | ) |
Build Gaussian Process regressor, i.e. compute internally all necessary matrices and vectors that describe the posterior GP.
|
private |
Compute the data covariance .
|
private |
Prior covariance function.
Evaluate the Gaussian Process at a given grid msc controls whether only mean will be computed, or standard devation and covariance as well.
Evaluate the Gaussian Process at a given grid msc controls whether only mean will be computed, or standard devation and covariance as well.
void Gproc::findBestCorrParam | ( | ) |
Function to find the best values for roughness parameters.
|
inline |
Get the correlation matrix .
|
inline |
Get alpha parameter.
|
inline |
Get beta parameter.
|
inline |
Get the posterior covariance matrix.
|
inline |
Get the dimensionality.
|
inline |
Get the number of basis terms in the trend.
|
inline |
Get the number of data points.
|
inline |
Get the roughness parameters.
|
inline |
Get Sigma-hat-squared, i.e. the posterior variance factor.
void Gproc::getSttPars | ( | Array1D< double > & | sttmat | ) |
Get the Student-t parameters.
|
inline |
Get the posterior variance vector.
|
inline |
Get , an auxiliary matrix.
Get the covariance in a different format, with the x,x' values.
|
inline |
Set the roughness parameter vector.
void Gproc::SetupData | ( | Array2D< double > & | xdata, |
Array1D< double > & | ydata, | ||
Array1D< double > & | datavar ) |
Setup the data.
void Gproc::SetupPrior | ( | ) |
Setup the prior.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Prior parameter .
|
private |
Prior parameter .
|
private |
|
private |
Covariance of the Student-t posterior.
|
private |
Covariance type, only 'SqExp' implemented so far.
|
private |
Data noise 'nugget'.
|
private |
Auxiliary matrices or vectors, see the UQTk Manual.
|
private |
|
private |
|
private |
|
private |
|
private |
Mean of the Student-t posterior.
|
private |
Dimensionality.
|
private |
Number of bases in the mean trend.
|
private |
Number of data points.
|
private |
Roughness parameter vector.
|
private |
Basis set for the trend function.
|
private |
Posterior variance factor.
|
private |
Variance of the Student-t posterior.
|
private |
Inverse of the mean trend coefficient prior covariance.
|
private |
|
private |
|
private |
|
private |
xdata array
|
private |
ydata array
|
private |
|
private |
Prior mean of the mean trend.