gplib  1.0.0
C++ Gaussian Process Library
kernels.hpp
Go to the documentation of this file.
1 #ifndef GPLIB_KERNEL
2 #define GPLIB_KERNEL
3 
4 #include "gp.hpp"
5 
6 namespace gplib {
7  namespace kernels {
8 
25  private:
28  public:
29 
34 
39  squared_exponential(const std::vector<double> &params);
53  arma::mat eval(const arma::mat &X, const arma::mat &Y,
54  bool diag = false) const;
67  arma::mat derivate(size_t param_id, const arma::mat &X,
68  const arma::mat &Y, bool diag = false) const;
72  size_t n_params() const;
78  void set_params(const std::vector<double> &params);
83  void set_lower_bounds(const std::vector<double> &lower_bounds);
88  void set_upper_bounds(const std::vector<double> &upper_bounds);
93  std::vector<double> get_params() const;
98  std::vector<double> get_lower_bounds() const;
103  std::vector<double> get_upper_bounds() const;
104  };
105  }
106 }
107 
108 #endif
Definition: gp.hpp:14
size_t n_params() const
Returns the number of params needed by the kernel.
Definition: kernels.cc:226
std::vector< double > get_params() const
Returns a vector with the current values of the parameters of the kernel.
Definition: kernels.cc:234
void set_lower_bounds(const std::vector< double > &lower_bounds)
Sets the lower bounds to be used by the kernel during training process.
Definition: kernels.cc:238
arma::mat eval(const arma::mat &X, const arma::mat &Y, bool diag=false) const
Evaluates the kernel function over the provided matrices.
Definition: kernels.cc:215
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 matrice...
Definition: kernels.cc:220
void set_upper_bounds(const std::vector< double > &upper_bounds)
Sets the upper bounds to be used by the kernel during training process.
Definition: kernels.cc:242
implementation * pimpl
Definition: kernels.hpp:26
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...
Definition: kernels.cc:245
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...
Definition: kernels.cc:249
squared_exponential()
Constructor.
Definition: kernels.cc:202
Definition: basic.cc:6
void set_params(const std::vector< double > &params)
Sets the parameters of the kernel using the proided vector.
Definition: kernels.cc:230
~squared_exponential()
Destructor.
Definition: kernels.cc:211
Squared exponential kernel with noise inference.
Definition: kernels.hpp:21