gplib
1.0.0
C++ Gaussian Process Library
|
Squared exponential kernel with noise inference. More...
#include <kernels.hpp>
Classes | |
struct | implementation |
Public Member Functions | |
squared_exponential () | |
Constructor. More... | |
squared_exponential (const std::vector< double > ¶ms) | |
Constructor, requires the hyperparameter. More... | |
~squared_exponential () | |
Destructor. More... | |
arma::mat | eval (const arma::mat &X, const arma::mat &Y, bool diag=false) const |
Evaluates the kernel function over the provided matrices. More... | |
arma::mat | derivate (size_t param_id, const arma::mat &X, const arma::mat &Y, bool diag=false) const |
Returns the value of the derivative wrt a certain parameter with a a particular pair of input matrices. More... | |
size_t | n_params () const |
Returns the number of params needed by the kernel. More... | |
void | set_params (const std::vector< double > ¶ms) |
Sets the parameters of the kernel using the proided vector. More... | |
void | set_lower_bounds (const std::vector< double > &lower_bounds) |
Sets the lower bounds to be used by the kernel during training process. More... | |
void | set_upper_bounds (const std::vector< double > &upper_bounds) |
Sets the upper bounds to be used by the kernel during training process. More... | |
std::vector< double > | get_params () const |
Returns a vector with the current values of the parameters of the kernel. More... | |
std::vector< double > | get_lower_bounds () const |
Returns a vector with the current values of the lower_bounds for each of the parameters of the kernel. More... | |
std::vector< double > | get_upper_bounds () const |
Returns a vector with the current values of the upper_bounds for each of the parameters of the kernel. More... | |
![]() | |
kernel_class () | |
Kernel Class definition. More... | |
virtual | ~kernel_class ()=default |
Destructor. More... | |
Private Attributes | |
implementation * | pimpl |
Squared exponential kernel with noise inference.
This kernel is defined as: sig ^ 2 * exp(- ((x - xp) * (x - xp)')/ 2 * l) + sig_noise ^ 2 * I
gplib::kernels::squared_exponential::squared_exponential | ( | ) |
Constructor.
gplib::kernels::squared_exponential::squared_exponential | ( | const std::vector< double > & | params | ) |
Constructor, requires the hyperparameter.
params | : Vector of hyperparameters |
gplib::kernels::squared_exponential::~squared_exponential | ( | ) |
Destructor.
|
virtual |
Returns the value of the derivative wrt a certain parameter with a a particular pair of input matrices.
param_id | : Identifier of the parameter we are derivating with respect to. |
X | : First matrix for derivative evaluation. |
Y | : Second matrix for derivative evaluation. |
diag | : Flag, if it is true the kernel should only be evaluated for the derivative entries pertaining to the diagonal of the answer matrix, this is due to performance reasons while using FITC. |
Implements gplib::kernel_class.
|
virtual |
Evaluates the kernel function over the provided matrices.
X | : First matrix for kernel evaluation. |
Y | : Second matrix for kernel evaluation. |
diag | : Flag, if it is true the kernel should only be evaluated for the entries pertaining to the diagonal of the answer matrix, this is due to performance reasons while using FITC. |
Implements gplib::kernel_class.
|
virtual |
Returns a vector with the current values of the lower_bounds for each of the parameters of the kernel.
Implements gplib::kernel_class.
|
virtual |
Returns a vector with the current values of the parameters of the kernel.
Implements gplib::kernel_class.
|
virtual |
Returns a vector with the current values of the upper_bounds for each of the parameters of the kernel.
Implements gplib::kernel_class.
|
virtual |
Returns the number of params needed by the kernel.
Implements gplib::kernel_class.
|
virtual |
Sets the lower bounds to be used by the kernel during training process.
lower_bounds | : Vector containing the lower bounds to be used. |
Implements gplib::kernel_class.
|
virtual |
Sets the parameters of the kernel using the proided vector.
params | : vector containing all the parameters needed by the kernel. |
Implements gplib::kernel_class.
|
virtual |
Sets the upper bounds to be used by the kernel during training process.
upper_bounds | : Vector containing the upper bounds to be used. |
Implements gplib::kernel_class.
|
private |