Gaussian Process. More...
#include <GaussianProcess.h>
Public Member Functions | |
| GaussianProcess (SVM *svm, double precision=0.0) | |
| Constructor. | |
| GaussianProcess (SVM *svm, const Array< double > &input, const Array< double > &target, double precision) | |
| Constructor. | |
| bool | isFeasible () |
| Check the feasibility of all hyper parameters. | |
| void | train (const Array< double > &input, const Array< double > &target) |
| Train the underlying SVM on the given training data using the current hyper parameter configuration. | |
| double | operator() (const Array< double > &x) |
| Do a model prediction, that is, use the underlying SVM to process the given sample. | |
| void | setBetaInv (double precision) |
Set the regularization parameter . | |
| void | setSigma (double s) |
Set the kernel parameter , assuming an underlying NormalizedRBFKernel kernel object. | |
| const Array2D< double > & | getC () |
| Return the regularized kernel matrix. | |
| const Array2D< double > & | getCInv () |
| Return the inverse of the regularized kernel matrix. | |
| const Array< double > & | getTarget () |
| Return the regression target values. | |
| double | Variance (const Array< double > &input, const Array< double > &target) |
| Return the variance of the Gaussian process given training data. | |
| double | Evidence (const Array< double > &input, const Array< double > &target) |
| Return the evidence of the Gaussian process given training data. | |
Protected Attributes | |
| Array2D< double > | C |
| regularized kernel matrix, valid after a call to train() | |
| Array2D< double > | CInv |
| inverse of the regularized kernel matrix, valid after a call to train() | |
| Array< double > | target |
| regression targets, valid after a call to train() | |
Gaussian Process.
The GaussianProcess model can either be trained directly or by a SVM_Optimizer object.
Definition at line 63 of file GaussianProcess.h.
| GaussianProcess::GaussianProcess | ( | SVM * | svm, | |
| double | precision = 0.0 | |||
| ) |
Constructor.
| precision | the regularization parameter |
Definition at line 51 of file GaussianProcess.cpp.
References setBetaInv().
| GaussianProcess::GaussianProcess | ( | SVM * | svm, | |
| const Array< double > & | input, | |||
| const Array< double > & | target, | |||
| double | precision | |||
| ) |
Constructor.
| precision | the regularization parameter |
Definition at line 57 of file GaussianProcess.cpp.
References setBetaInv(), and train().
| double GaussianProcess::Evidence | ( | const Array< double > & | input, | |
| const Array< double > & | target | |||
| ) |
Return the evidence of the Gaussian process given training data.
Definition at line 145 of file GaussianProcess.cpp.
References GaussianProcessEvidence::error().
| const Array2D< double > & GaussianProcess::getC | ( | ) |
Return the regularized kernel matrix.
Definition at line 124 of file GaussianProcess.cpp.
References C.
Referenced by GaussianProcessEvidence::dEvidenceDTheta(), and GaussianProcessEvidence::evidence().
| const Array2D< double > & GaussianProcess::getCInv | ( | ) |
Return the inverse of the regularized kernel matrix.
Definition at line 129 of file GaussianProcess.cpp.
References CInv.
Referenced by GaussianProcessEvidence::dEvidenceDTheta(), GaussianProcessVariance::error(), and GaussianProcessEvidence::evidence().
| const Array< double > & GaussianProcess::getTarget | ( | ) |
Return the regression target values.
Definition at line 134 of file GaussianProcess.cpp.
References target.
Referenced by GaussianProcessEvidence::dEvidenceDTheta(), and GaussianProcessEvidence::evidence().
| bool GaussianProcess::isFeasible | ( | ) | [virtual] |
Check the feasibility of all hyper parameters.
Reimplemented from MetaSVM.
Definition at line 65 of file GaussianProcess.cpp.
References Model::parameter.
| double GaussianProcess::operator() | ( | const Array< double > & | x | ) |
Do a model prediction, that is, use the underlying SVM to process the given sample.
This method is equivalent to calling the underlying SVM object.
Definition at line 109 of file GaussianProcess.cpp.
References MetaSVM::getSVM(), and SVM::model().
| void GaussianProcess::setBetaInv | ( | double | precision | ) |
Set the regularization parameter
.
Definition at line 114 of file GaussianProcess.cpp.
References MetaSVM::setParameter().
Referenced by GaussianProcess().
| void GaussianProcess::setSigma | ( | double | s | ) |
Set the kernel parameter
, assuming an underlying NormalizedRBFKernel kernel object.
In general, this method sets the first kernel parameter to the specified value.
Definition at line 119 of file GaussianProcess.cpp.
References MetaSVM::setParameter().
| void GaussianProcess::train | ( | const Array< double > & | input, | |
| const Array< double > & | target | |||
| ) |
Train the underlying SVM on the given training data using the current hyper parameter configuration.
This function will also be called when GaussianProcess model is optimized by an SVM_Optimizer.
Definition at line 70 of file GaussianProcess.cpp.
References C, CInv, MetaSVM::getSVM(), i, Model::parameter, Model::setParameter(), SVM::SetTrainingData(), MetaSVM::svm, and target.
Referenced by GaussianProcess(), and SVM_Optimizer::optimize().
| double GaussianProcess::Variance | ( | const Array< double > & | input, | |
| const Array< double > & | target | |||
| ) |
Return the variance of the Gaussian process given training data.
Definition at line 139 of file GaussianProcess.cpp.
References GaussianProcessVariance::error().
Array2D<double> GaussianProcess::C [protected] |
regularized kernel matrix, valid after a call to train()
Definition at line 118 of file GaussianProcess.h.
Array2D<double> GaussianProcess::CInv [protected] |
inverse of the regularized kernel matrix, valid after a call to train()
Definition at line 122 of file GaussianProcess.h.
Array<double> GaussianProcess::target [protected] |
regression targets, valid after a call to train()
Definition at line 126 of file GaussianProcess.h.
Referenced by getTarget(), and train().