gplib  1.0.0
C++ Gaussian Process Library
Public Member Functions | List of all members
gplib::multioutput_kernel_class Class Referenceabstract

#include <gp.hpp>

Inheritance diagram for gplib::multioutput_kernel_class:
Inheritance graph
[legend]

Public Member Functions

 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 > &params)
 Constructor, requires the inner kernels to be used and the parameter matrices. More...
 
virtual ~multioutput_kernel_class ()=default
 Destructor. More...
 
virtual arma::mat eval (const std::vector< arma::mat > &X, const std::vector< arma::mat > &Y, bool diag=false) const =0
 Evaluates the kernel function over the provided sets of matrices. More...
 
virtual arma::mat derivate (size_t param_id, const std::vector< arma::mat > &X, const std::vector< arma::mat > &Y, bool diag=false) const =0
 Returns the value of the derivative wrt a certain parameter with a a particular pair of input matrices. More...
 
virtual size_t n_params () const =0
 Returns the total number of parameters needed bythe kernel (parameter matrices, plus the parameters of each inner kernel). More...
 
virtual void set_params_k (const std::vector< arma::mat > &params)=0
 Sets the parameters of the multioutput kernel only, doesn't affect the parameters of the inner kernels. More...
 
virtual void set_params (const std::vector< double > &params, size_t n_outputs=0)=0
 Sets all the parameters of the multioutput kernel including those of the inner kernels using a std. More...
 
virtual void set_kernels (const std::vector< std::shared_ptr< kernel_class >> &kernels)=0
 Sets the inner kernels. More...
 
virtual std::vector< arma::mat > get_params_k () const =0
 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...
 
virtual std::vector< double > get_params () const =0
 Returns a std. More...
 
virtual std::vector< std::shared_ptr< kernel_class > > get_kernels () const =0
 Returns a Shared pointer to a vector containing the inner kernels currently set. More...
 
virtual void set_lower_bounds (const double &lower_bounds)=0
 Sets the lower bounds to be used by the kernel during training process including those of the inner kernels. More...
 
virtual void set_upper_bounds (const double &upper_bounds)=0
 Sets the upper bounds to be used by the kernel during training process including those of the inner kernels. More...
 
virtual void set_lower_bounds (const std::vector< double > &lower_bounds)=0
 Sets the lower bounds to be used by the kernel during training process including thos of the inner kernels. More...
 
virtual void set_upper_bounds (const std::vector< double > &params)=0
 Sets the upper bounds to be used by the kernel during training process including thos of the inner kernels. More...
 
virtual std::vector< double > get_lower_bounds () const =0
 Returns a vector with the lower bounds of all the parameters, including those of the inner kernels. More...
 
virtual std::vector< double > get_upper_bounds () const =0
 Returns a vector with the upper bounds of all the parameters, including those of the inner kernels. More...
 

Constructor & Destructor Documentation

gplib::multioutput_kernel_class::multioutput_kernel_class ( )
inline

Multioutput Kernel Class definition.

Constructor

gplib::multioutput_kernel_class::multioutput_kernel_class ( const std::vector< std::shared_ptr< kernel_class >> &  kernels,
const std::vector< arma::mat > &  params 
)
inline

Constructor, requires the inner kernels to be used and the parameter matrices.

Parameters
kernels: Shared pointer containing a vector with the Inner kernels (kernel_class).
params: Parameter matrices.
virtual gplib::multioutput_kernel_class::~multioutput_kernel_class ( )
virtualdefault

Destructor.

Member Function Documentation

virtual arma::mat gplib::multioutput_kernel_class::derivate ( size_t  param_id,
const std::vector< arma::mat > &  X,
const std::vector< arma::mat > &  Y,
bool  diag = false 
) const
pure virtual

Returns the value of the derivative wrt a certain parameter with a a particular pair of input matrices.

Parameters
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.

Implemented in gplib::multioutput_kernels::lmc_kernel.

virtual arma::mat gplib::multioutput_kernel_class::eval ( const std::vector< arma::mat > &  X,
const std::vector< arma::mat > &  Y,
bool  diag = false 
) const
pure virtual

Evaluates the kernel function over the provided sets of matrices.

Parameters
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.

Implemented in gplib::multioutput_kernels::lmc_kernel.

virtual std::vector<std::shared_ptr<kernel_class> > gplib::multioutput_kernel_class::get_kernels ( ) const
pure virtual

Returns a Shared pointer to a vector containing the inner kernels currently set.

Implemented in gplib::multioutput_kernels::lmc_kernel.

virtual std::vector<double> gplib::multioutput_kernel_class::get_lower_bounds ( ) const
pure virtual

Returns a vector with the lower bounds of all the parameters, including those of the inner kernels.

Implemented in gplib::multioutput_kernels::lmc_kernel.

virtual std::vector<double> gplib::multioutput_kernel_class::get_params ( ) const
pure virtual

Returns a std.

vector containing all of the parameters of the multioutput kernel, including those of each inner kernel.

Implemented in gplib::multioutput_kernels::lmc_kernel.

virtual std::vector<arma::mat> gplib::multioutput_kernel_class::get_params_k ( ) const
pure 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).

Implemented in gplib::multioutput_kernels::lmc_kernel.

virtual std::vector<double> gplib::multioutput_kernel_class::get_upper_bounds ( ) const
pure virtual

Returns a vector with the upper bounds of all the parameters, including those of the inner kernels.

Implemented in gplib::multioutput_kernels::lmc_kernel.

virtual size_t gplib::multioutput_kernel_class::n_params ( ) const
pure virtual

Returns the total number of parameters needed bythe kernel (parameter matrices, plus the parameters of each inner kernel).

Implemented in gplib::multioutput_kernels::lmc_kernel.

virtual void gplib::multioutput_kernel_class::set_kernels ( const std::vector< std::shared_ptr< kernel_class >> &  kernels)
pure virtual

Sets the inner kernels.

Parameters
kernels: Shared pointer containing a vector of kernel_class kernels.

Implemented in gplib::multioutput_kernels::lmc_kernel.

virtual void gplib::multioutput_kernel_class::set_lower_bounds ( const double &  lower_bounds)
pure virtual

Sets the lower bounds to be used by the kernel during training process including those of the inner kernels.

Parameters
lower_bounds: double, the lower bounds of all the parameters will be set to this value.

Implemented in gplib::multioutput_kernels::lmc_kernel.

virtual void gplib::multioutput_kernel_class::set_lower_bounds ( const std::vector< double > &  lower_bounds)
pure virtual

Sets the lower bounds to be used by the kernel during training process including thos of the inner kernels.

Parameters
lower_bounds: Vector containing the lower bounds to be used.

Implemented in gplib::multioutput_kernels::lmc_kernel.

virtual void gplib::multioutput_kernel_class::set_params ( const std::vector< double > &  params,
size_t  n_outputs = 0 
)
pure virtual

Sets all the parameters of the multioutput kernel including those of the inner kernels using a std.

vector.

Parameters
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.

Implemented in gplib::multioutput_kernels::lmc_kernel.

virtual void gplib::multioutput_kernel_class::set_params_k ( const std::vector< arma::mat > &  params)
pure virtual

Sets the parameters of the multioutput kernel only, doesn't affect the parameters of the inner kernels.

Parameters
params: Vector of matrices containing the parameters the size of the vector should be the same as the number of latent functions (inner kernels).

Implemented in gplib::multioutput_kernels::lmc_kernel.

virtual void gplib::multioutput_kernel_class::set_upper_bounds ( const double &  upper_bounds)
pure virtual

Sets the upper bounds to be used by the kernel during training process including those of the inner kernels.

Parameters
upper_bounds: double, the upper bounds of all the parameters will be set to this value.

Implemented in gplib::multioutput_kernels::lmc_kernel.

virtual void gplib::multioutput_kernel_class::set_upper_bounds ( const std::vector< double > &  params)
pure virtual

Sets the upper bounds to be used by the kernel during training process including thos of the inner kernels.

Parameters
upper_bounds: Vector containing the upper bounds to be used.

Implemented in gplib::multioutput_kernels::lmc_kernel.


The documentation for this class was generated from the following file: