gplib  1.0.0
C++ Gaussian Process Library
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
gplib::gp_reg_multi Class Reference

#include <gp.hpp>

Collaboration diagram for gplib::gp_reg_multi:
Collaboration graph
[legend]

Classes

struct  implementation
 

Public Types

enum  { FULL, FITC }
 

Public Member Functions

 gp_reg_multi ()
 Constructor. More...
 
 ~gp_reg_multi ()
 Destructor. More...
 
void set_kernel (const std::shared_ptr< multioutput_kernel_class > &k)
 Sets the multioutput kernel to be used with the multioutput regression. More...
 
void set_training_set (const std::vector< arma::mat > &X, const std::vector< arma::vec > &y)
 Sets the pairs of known input and output data used to train the model. More...
 
double train (const int max_iter, const double tol)
 Trains the model using the standard procedure, in accordance to the provided training set. More...
 
double train (const int max_iter, const double tol, const size_t num_pi)
 Trains the the model using the FITC approximation, in accordance to the provided training set. More...
 
double train (const int max_iter, const double tol, const std::vector< size_t > num_pi)
 
double train (const int max_iter, const double tol, const std::vector< arma::mat > num_pi)
 
mv_gauss full_predict (const std::vector< arma::mat > &new_data)
 Uses the already trained model to predict output values for new inputs provided in the parameter,this method returns the complete multivariate gaussian distribution resulting from the regression process. More...
 
arma::vec predict (const std::vector< arma::mat > &new_data) const
 Uses the already trained model to predict output values for new inputs provided in the parameter, this method returns only the mean of the multivariate gaussian distribution resulting from the regression process, which is the "best guess" for each new input. More...
 
std::vector< double > get_params () const
 Returns a vector with the complete set of parameters required by the multioutput regression (pseudo-inputs if using FITC, multioutput kernel parameters and inner kernel parameters). More...
 
void set_params (const std::vector< double > &params)
 Sets all the parameters of the multioutput regression using the Vector prvided. More...
 

Private Attributes

implementationpimpl
 

Member Enumeration Documentation

anonymous enum
Enumerator
FULL 
FITC 

Constructor & Destructor Documentation

gplib::gp_reg_multi::gp_reg_multi ( )

Constructor.

gplib::gp_reg_multi::~gp_reg_multi ( )

Destructor.

Member Function Documentation

mv_gauss gplib::gp_reg_multi::full_predict ( const std::vector< arma::mat > &  new_data)

Uses the already trained model to predict output values for new inputs provided in the parameter,this method returns the complete multivariate gaussian distribution resulting from the regression process.

Parameters
new_data: A vector of matrices containing points for which output data is unknown in one or more of the output classes.
vector< double > gplib::gp_reg_multi::get_params ( ) const

Returns a vector with the complete set of parameters required by the multioutput regression (pseudo-inputs if using FITC, multioutput kernel parameters and inner kernel parameters).

arma::vec gplib::gp_reg_multi::predict ( const std::vector< arma::mat > &  new_data) const

Uses the already trained model to predict output values for new inputs provided in the parameter, this method returns only the mean of the multivariate gaussian distribution resulting from the regression process, which is the "best guess" for each new input.

Parameters
new_data: A vector of matrices containing points for which output data is unknown in one or more of the output classes.
void gplib::gp_reg_multi::set_kernel ( const std::shared_ptr< multioutput_kernel_class > &  k)

Sets the multioutput kernel to be used with the multioutput regression.

This kernel should have already been assigned inner kernels for each latent function.

Parameters
k: A multioutput class kernel, Default is an LMC Kernel, but you can implement your own class using the provided API.
void gplib::gp_reg_multi::set_params ( const std::vector< double > &  params)

Sets all the parameters of the multioutput regression using the Vector prvided.

Parameters
params: A vector containing all parameters required by the multioutput regression (pseudo-inputs if need be, multioutput kernel parameters and inner kernel parameters).
void gplib::gp_reg_multi::set_training_set ( const std::vector< arma::mat > &  X,
const std::vector< arma::vec > &  y 
)

Sets the pairs of known input and output data used to train the model.

Parameters
X: Vector of matrices, each matrix contains the inputs related to each output class.
y: Vector of vectors, each vector contains the outputs related to each output class, and to each of the imputs.
double gplib::gp_reg_multi::train ( const int  max_iter,
const double  tol 
)

Trains the model using the standard procedure, in accordance to the provided training set.

Parameters
max_iter: Maximum number of iterations during training.
tol: Relative tolerance on the optimization parameters.
double gplib::gp_reg_multi::train ( const int  max_iter,
const double  tol,
const size_t  num_pi 
)

Trains the the model using the FITC approximation, in accordance to the provided training set.

Parameters
num_pi: Number of inducing points per output class, should be smaller than the smallest number of inputs for any output class, use of this parameter triggers the use of FITC instead of the full regression.
double gplib::gp_reg_multi::train ( const int  max_iter,
const double  tol,
const std::vector< size_t >  num_pi 
)
Parameters
num_pi: A vector containing the number of inducing points for each output class, each value should be smaller than the corresponding number of inputs for the output class, use of this parameter triggers the use of FITC instead of the full regression.
double gplib::gp_reg_multi::train ( const int  max_iter,
const double  tol,
const std::vector< arma::mat >  num_pi 
)

Member Data Documentation

implementation* gplib::gp_reg_multi::pimpl
private

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