#include <gp.h>
List of all members.
Public Member Functions |
| | GP (int d, int n=0) |
| virtual | ~GP () |
| virtual void | Sample () |
| bool | Add (const Eigen::VectorXd &x, double f) |
| void | Train () |
| void | Train (const Eigen::MatrixXd &Xs, const Eigen::VectorXd &fs) |
| double | Predict (const Eigen::VectorXd &x, double *s=0) const |
| double | SqExp (const Eigen::VectorXd &xa, const Eigen::VectorXd &xb) const |
| double | LogL (double dll[2]=0) |
| double | PI (const Eigen::VectorXd &x, double fmin) const |
| double | OptParams () |
Public Attributes |
| int | d |
| | dimension
|
| int | n |
| | number of data points
|
| Eigen::MatrixXd | Xs |
| | data points
|
| Eigen::VectorXd | fs |
| | values
|
| Eigen::MatrixXd | K |
| Eigen::MatrixXd | Ki |
| Eigen::MatrixXd | L |
| Eigen::VectorXd | a |
| double | l |
| double | s |
| double | sigma |
| bool | cf |
| | propagate cholesky factor L rather than K^{-1}
|
| bool | eps |
| | prohibit adding points that are eps-close in L_2 to existing data
|
Constructor & Destructor Documentation
Initialize a GP with dimension d and number of points n
- Parameters:
-
| d | dimension |
| n | number of points (optional) |
Member Function Documentation
| bool GP::Add |
( |
const Eigen::VectorXd & |
x, |
|
|
double |
f |
|
) |
| |
Add a new data point
- Parameters:
-
| x | data vector |
| f | value |
| true | if OK |
References a, cf, d, eps, fs, K, Ki, L, l, n, sigma, SqExp(), and Xs.
Loglikelihood
- Parameters:
-
| dll | derivative of log-liklihood w.r. to l and s |
- Returns:
- log-likelihood
References a, d, L, l, n, and s.
Referenced by OptParams().
Optimize GP parameters. This is currently done naively using a grid enumeration over l and s
References l, LogL(), and Train().
| double GP::PI |
( |
const Eigen::VectorXd & |
x, |
|
|
double |
fmin |
|
) |
| const |
Probability of improvement over a given value fmin x data vector
- Parameters:
-
- Returns:
- probability of improvement
References gcop::ncdf(), Predict(), and s.
| double GP::Predict |
( |
const Eigen::VectorXd & |
x, |
|
|
double * |
s = 0 |
|
) |
| const |
Predict value at point x
- Parameters:
-
| x | point |
| s | pointer to predicted covariance (optional) |
- Returns:
- predicted mean
References a, cf, Ki, L, sigma, and SqExp().
Referenced by PI().
Generate random points
References fs, and Xs.
| double GP::SqExp |
( |
const Eigen::VectorXd & |
xa, |
|
|
const Eigen::VectorXd & |
xb |
|
) |
| const |
Square exponential kernel
- Parameters:
-
| xa | first point |
| xb | second point |
- Returns:
- correlation
References d, l, and s.
Referenced by Add(), Predict(), and Train().
| void gcop::GP::Train |
( |
const Eigen::MatrixXd & |
Xs, |
|
|
const Eigen::VectorXd & |
fs |
|
) |
| |
Train GP using a given dataset (xs, fs)
- Parameters:
-
| d-n | matrix of data vectors |
| n-vector | of values |
Member Data Documentation
prohibit adding points that are eps-close in L_2 to existing data
Referenced by Add().
The documentation for this class was generated from the following files: