Kernel::covariance(left, right) is the prior covariance of two rows. More...
#include <gpr/bo/ScalarGaussianProcess.h>
Public Member Functions | |
| ScalarGaussianProcess (Kernel kernel) | |
| void | setNoiseVariance (double noise_variance) |
| void | setObservationNoiseVariances (const Eigen::VectorXd &noise_variances) |
| void | setUsePriorMean (bool enabled) |
| void | setMeanBasis (MeanBasis basis) |
| Set the basis of the mean m(x) = phi(x)^T beta. | |
| bool | hasMeanBasis () const noexcept |
| True when a mean basis is set. | |
| void | setConditionNumberLimit (double limit) |
| void | setObservations (const Eigen::MatrixXd &x, const Eigen::VectorXd &y) |
| Rows of x are observation vectors. y has one scalar per row. | |
| bool | fitted () const noexcept |
| double | noiseVariance () const noexcept |
| Shared noise variance. Zero while per-row variances are set. | |
| const Eigen::VectorXd & | observationNoiseVariances () const noexcept |
| Per-row noise variances. Empty while one variance is shared. | |
| Eigen::Index | observationCount () const |
| bool | fit () |
| Factor K = k(X, X) + diag(noise) plus the minimum conditioning nugget. | |
| double | logMarginalLikelihood () const |
| Log marginal likelihood of the observations at the last fit. | |
| bool | fit (const Eigen::MatrixXd &x, const Eigen::VectorXd &y, const Eigen::VectorXd &noise_variances) |
| Store the rows with one noise variance each, then factor. | |
| bool | fit (const Eigen::MatrixXd &x, const Eigen::VectorXd &y, double noise_variance) |
| Store the rows with one shared noise variance, then factor. | |
| double | priorMean () const noexcept |
| Fitted constant of a one-function basis; zero otherwise. | |
| const Eigen::VectorXd & | meanCoefficients () const noexcept |
| Generalized least squares estimate of beta. Empty without a basis. | |
| const Eigen::MatrixXd & | meanCoefficientCovariance () const noexcept |
| Covariance (H^T K^-1 H)^-1 of the estimate of beta. | |
| double | conditionNumber () const noexcept |
| double | effectiveNugget () const noexcept |
| void | predict (const Eigen::VectorXd &query, double &mean, double &standard_deviation) const |
| Latent mean and standard deviation at one parameter vector. | |
| void | predictObservation (const Eigen::Ref< const Eigen::MatrixXd > &queries, const Eigen::VectorXd &query_noise_variances, Eigen::VectorXd &mean, Eigen::VectorXd &standard_deviation) const |
| Predict a new noisy observation at each query row. | |
| void | predict (const Eigen::Ref< const Eigen::MatrixXd > &queries, Eigen::VectorXd &mean, Eigen::VectorXd &standard_deviation) const |
| Predict the latent function at each query row. | |
Kernel::covariance(left, right) is the prior covariance of two rows.
Definition at line 42 of file ScalarGaussianProcess.h.
|
inlineexplicit |
Definition at line 44 of file ScalarGaussianProcess.h.
|
inlinenodiscardnoexcept |
Definition at line 309 of file ScalarGaussianProcess.h.
|
inlinenodiscardnoexcept |
Definition at line 314 of file ScalarGaussianProcess.h.
|
inline |
Factor K = k(X, X) + diag(noise) plus the minimum conditioning nugget.
Definition at line 156 of file ScalarGaussianProcess.h.
|
inline |
Store the rows with one noise variance each, then factor.
Row i of x is observed with variance noise_variances[i], which is added to entry (i, i) of the covariance. The rows may differ, as they do for Monte Carlo averages of different lengths.
Definition at line 268 of file ScalarGaussianProcess.h.
|
inline |
Store the rows with one shared noise variance, then factor.
Definition at line 281 of file ScalarGaussianProcess.h.
|
inlinenodiscardnoexcept |
Definition at line 132 of file ScalarGaussianProcess.h.
|
inlinenodiscardnoexcept |
True when a mean basis is set.
Definition at line 103 of file ScalarGaussianProcess.h.
|
inlinenodiscard |
Log marginal likelihood of the observations at the last fit.
-1/2 r^T K^-1 r - 1/2 log|K| - n/2 log(2 pi) with r = y for the zero mean: Rasmussen and Williams (2006), equation (2.30). With a basis of p functions, r = y - H beta and the value is -1/2 r^T K^-1 r - 1/2 log|K| - 1/2 log|H^T K^-1 H|
Definition at line 253 of file ScalarGaussianProcess.h.
|
inlinenodiscardnoexcept |
Covariance (H^T K^-1 H)^-1 of the estimate of beta.
Definition at line 303 of file ScalarGaussianProcess.h.
|
inlinenodiscardnoexcept |
Generalized least squares estimate of beta. Empty without a basis.
Definition at line 297 of file ScalarGaussianProcess.h.
|
inlinenodiscardnoexcept |
Shared noise variance. Zero while per-row variances are set.
Definition at line 138 of file ScalarGaussianProcess.h.
|
inlinenodiscard |
Definition at line 150 of file ScalarGaussianProcess.h.
|
inlinenodiscardnoexcept |
Per-row noise variances. Empty while one variance is shared.
Definition at line 144 of file ScalarGaussianProcess.h.
|
inline |
Predict the latent function at each query row.
standard_deviation is that of the noise-free function: no observation noise is added, so it tends to zero at a row observed without noise. predictObservation() adds the noise of a new run.
Definition at line 374 of file ScalarGaussianProcess.h.
|
inline |
Latent mean and standard deviation at one parameter vector.
Definition at line 320 of file ScalarGaussianProcess.h.
|
inline |
Predict a new noisy observation at each query row.
The mean is the latent mean. The variance is the latent variance plus query_noise_variances, one entry per row or a single entry for every row. Pass noiseVariance() to predict a replicate of a run observed with the shared variance.
Definition at line 340 of file ScalarGaussianProcess.h.
|
inlinenodiscardnoexcept |
Fitted constant of a one-function basis; zero otherwise.
Definition at line 290 of file ScalarGaussianProcess.h.
|
inline |
Definition at line 108 of file ScalarGaussianProcess.h.
|
inline |
Set the basis of the mean m(x) = phi(x)^T beta.
fit() estimates beta by generalized least squares, beta = (H^T K^-1 H)^-1 H^T K^-1 y with row i of H equal to phi(x_i)^T, and conditions the GP on y - H beta. predict() adds the term R^T (H^T K^-1 H)^-1 R, R = phi(x*) - H^T K^-1 k*, that carries the uncertainty of beta into the variance. An empty function restores the zero mean.
Definition at line 96 of file ScalarGaussianProcess.h.
|
inline |
Definition at line 48 of file ScalarGaussianProcess.h.
|
inline |
Definition at line 58 of file ScalarGaussianProcess.h.
|
inline |
Rows of x are observation vectors. y has one scalar per row.
Definition at line 119 of file ScalarGaussianProcess.h.
|
inline |
Off by default, so the prior mean is zero. When on, fit() profiles a constant mean by generalized least squares and predict() adds its uncertainty to the variance. It is setMeanBasis() with phi(x) = 1.
Definition at line 75 of file ScalarGaussianProcess.h.