|
gplib
1.0.0
C++ Gaussian Process Library
|
Linear model of coregionalization : http://www.jmlr.org/papers/volume12/alvarez11a/alvarez11a.pdf. More...
#include <multioutput_kernels.hpp>


Classes | |
| struct | implementation |
Public Member Functions | |
| lmc_kernel () | |
| Constructor. More... | |
| lmc_kernel (const std::vector< std::shared_ptr< kernel_class >> &kernels, const std::vector< arma::mat > ¶ms) | |
| Constructor, requires the inner kernels to be used and the parameter matrices. More... | |
| lmc_kernel (const size_t lf_number, size_t n_outputs) | |
| Constructor, requires the number of latent functions and the number of outputs to be used, creates default kernels and parameters. More... | |
| ~lmc_kernel () | |
| Destructor. More... | |
| arma::mat | eval (const std::vector< arma::mat > &X, const std::vector< arma::mat > &Y, bool diag=false) const |
| Evaluates the kernel function over the provided sets of matrices. More... | |
| arma::mat | derivate (size_t param_id, const std::vector< arma::mat > &X, const std::vector< 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 total number of parameters needed by the kernel (parameter matrices, plus the parameters of each inner kernel). More... | |
| void | set_params_k (const std::vector< arma::mat > ¶ms) |
| Sets the parameters of the multioutput kernel only, doesn't affect the parameters of the inner kernels. More... | |
| void | set_params (const std::vector< double > ¶ms, size_t n_outputs=0) |
| Sets all the parameters of the multioutput kernel including those of the inner kernels using a std. More... | |
| void | set_param (size_t q, size_t a, size_t b, const double param) |
| Sets the parameter of the matrix B in multioutput kernel. More... | |
| void | set_param (size_t q, size_t param_id, const double param) |
| Sets the parameter of the matrix B in multioutput kernel. More... | |
| void | set_kernels (const std::vector< std::shared_ptr< kernel_class >> &kernels) |
| Sets the inner kernels. More... | |
| std::vector< arma::mat > | get_params_k () const |
| Returns a vector of matrices containing the parameters of the multioutput kernel, but not those of the inner kernels (in other words only the parameter matrices). More... | |
| std::vector< double > | get_params () const |
| Returns a std vector containing all of the parameters of the multioutput kernel, including those of each inner kernel. More... | |
| std::vector< std::shared_ptr< kernel_class > > | get_kernels () const |
| Returns a shared pointer to a vector containing the inner kernels currently set. More... | |
| double | get_param (size_t q, size_t a, size_t b) const |
| Returns a double with a single parameter of the matrix B of the multioutput kernel. More... | |
| double | get_param (size_t q, size_t param_id) const |
| Returns a double with a single parameter in the inner kernel of the multioutput kernel. More... | |
| void | set_lower_bounds (const double &lower_bounds) |
| Sets the lower bounds to be used by the kernel during training process including those of the inner kernels. More... | |
| void | set_upper_bounds (const double &upper_bounds) |
| Sets the upper bounds to be used by the kernel during training process including those of the inner kernels. More... | |
| void | set_lower_bounds (const std::vector< double > &lower_bounds) |
| Sets the lower bounds to be used by the kernel during training process including thos of the inner kernels. More... | |
| void | set_upper_bounds (const std::vector< double > &upper_bounds) |
| Sets the upper bounds to be used by the kernel during training process including thos of the inner kernels. More... | |
| std::vector< double > | get_lower_bounds () const |
| Returns a vector with the lower bounds of all the parameters, including those of the inner kernels. More... | |
| std::vector< double > | get_upper_bounds () const |
| Returns a vector with the upper bounds of all the parameters, including those of the inner kernels. More... | |
Public Member Functions inherited from gplib::multioutput_kernel_class | |
| multioutput_kernel_class () | |
| Multioutput Kernel Class definition. More... | |
| multioutput_kernel_class (const std::vector< std::shared_ptr< kernel_class >> &kernels, const std::vector< arma::mat > ¶ms) | |
| Constructor, requires the inner kernels to be used and the parameter matrices. More... | |
| virtual | ~multioutput_kernel_class ()=default |
| Destructor. More... | |
Private Attributes | |
| implementation * | pimpl |
Linear model of coregionalization : http://www.jmlr.org/papers/volume12/alvarez11a/alvarez11a.pdf.
| gplib::multioutput_kernels::lmc_kernel::lmc_kernel | ( | ) |
Constructor.
| gplib::multioutput_kernels::lmc_kernel::lmc_kernel | ( | const std::vector< std::shared_ptr< kernel_class >> & | kernels, |
| const std::vector< arma::mat > & | params | ||
| ) |
Constructor, requires the inner kernels to be used and the parameter matrices.
| kernels | : Shared pointer containing a vector with the inner kernels (kernel_class). |
| params | : Vector containing the parameter matrices. |
| gplib::multioutput_kernels::lmc_kernel::lmc_kernel | ( | const size_t | lf_number, |
| size_t | n_outputs | ||
| ) |
Constructor, requires the number of latent functions and the number of outputs to be used, creates default kernels and parameters.
| lf_number | : size_t, Number of latent functions. |
| n_outputs | : size_t, Number of outputs. |
| gplib::multioutput_kernels::lmc_kernel::~lmc_kernel | ( | ) |
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 vector of matrices for derivative evaluation. |
| Y | : Second vector of matrices 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::multioutput_kernel_class.
|
virtual |
Evaluates the kernel function over the provided sets of matrices.
| X | : First vector of matrices for kernel evaluation. |
| Y | : Second vector of matrices 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::multioutput_kernel_class.
|
virtual |
Returns a shared pointer to a vector containing the inner kernels currently set.
Implements gplib::multioutput_kernel_class.
|
virtual |
Returns a vector with the lower bounds of all the parameters, including those of the inner kernels.
Implements gplib::multioutput_kernel_class.
| double gplib::multioutput_kernels::lmc_kernel::get_param | ( | size_t | q, |
| size_t | a, | ||
| size_t | b | ||
| ) | const |
Returns a double with a single parameter of the matrix B of the multioutput kernel.
| q | identifier of the latent function. |
| a | identifier of the param row. |
| b | identifier of the param col. |
| double gplib::multioutput_kernels::lmc_kernel::get_param | ( | size_t | q, |
| size_t | param_id | ||
| ) | const |
Returns a double with a single parameter in the inner kernel of the multioutput kernel.
| q | identifier of the inner kernel. |
| param_id | the identifier of the parameter. |
|
virtual |
Returns a std vector containing all of the parameters of the multioutput kernel, including those of each inner kernel.
Implements gplib::multioutput_kernel_class.
|
virtual |
Returns a vector of matrices containing the parameters of the multioutput kernel, but not those of the inner kernels (in other words only the parameter matrices).
Implements gplib::multioutput_kernel_class.
|
virtual |
Returns a vector with the upper bounds of all the parameters, including those of the inner kernels.
Implements gplib::multioutput_kernel_class.
|
virtual |
Returns the total number of parameters needed by the kernel (parameter matrices, plus the parameters of each inner kernel).
Implements gplib::multioutput_kernel_class.
|
virtual |
Sets the inner kernels.
| kernels | : Shared pointer containing a vector of kernel_class kernels. |
Implements gplib::multioutput_kernel_class.
|
virtual |
Sets the lower bounds to be used by the kernel during training process including those of the inner kernels.
| lower_bounds | : double, the lower bounds of all the parameters will be set to this value. |
Implements gplib::multioutput_kernel_class.
|
virtual |
Sets the lower bounds to be used by the kernel during training process including thos of the inner kernels.
| lower_bounds | : Vector containing the lower bounds to be used. |
Implements gplib::multioutput_kernel_class.
| void gplib::multioutput_kernels::lmc_kernel::set_param | ( | size_t | q, |
| size_t | a, | ||
| size_t | b, | ||
| const double | param | ||
| ) |
Sets the parameter of the matrix B in multioutput kernel.
| q | identifier of the latent function. |
| a | identifier of the parameter row. |
| b | identifier of the parameter col. |
| param | the value of the parameter to be set. |
| void gplib::multioutput_kernels::lmc_kernel::set_param | ( | size_t | q, |
| size_t | param_id, | ||
| const double | param | ||
| ) |
Sets the parameter of the matrix B in multioutput kernel.
| q | identifier of the inner kernel. |
| param_id | identifier of the parameter. |
| param | the value of the parameter to be set. |
|
virtual |
Sets all the parameters of the multioutput kernel including those of the inner kernels using a std.
vector.
| params | : vector containing all the parameters needed by the multioutput kernel. |
| n_outputs | : If passed a number bigger than 0 the parameter matrices will be shaped according to the number received. |
Implements gplib::multioutput_kernel_class.
|
virtual |
Sets the parameters of the multioutput kernel only, doesn't affect the parameters of the inner kernels.
| params | : Vector of matrices containing the parameters the size of the vector should be the same as the number of latent functions (inner kernels). |
Implements gplib::multioutput_kernel_class.
|
virtual |
Sets the upper bounds to be used by the kernel during training process including those of the inner kernels.
| upper_bounds | : double, the upper bounds of all the parameters will be set to this value. |
Implements gplib::multioutput_kernel_class.
|
virtual |
Sets the upper bounds to be used by the kernel during training process including thos of the inner kernels.
| upper_bounds | : Vector containing the upper bounds to be used. |
Implements gplib::multioutput_kernel_class.
|
private |
1.8.9.1