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

#include <gp.hpp>

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

Classes

struct  implementation
 

Public Member Functions

 gp_reg ()
 Constructor. More...
 
 ~gp_reg ()
 Destructor. More...
 
void set_kernel (const std::shared_ptr< kernel_class > &k)
 Sets the kernel to be used during the regression process. More...
 
std::shared_ptr< kernel_classget_kernel () const
 Returns the current kernel set to be used during the regression process. More...
 
void set_training_set (const arma::mat &X, const arma::vec &y)
 Sets the training set to be used during the training process. More...
 
double train (int max_iter, double tol)
 Trains the model using the provided training set. More...
 
mv_gauss full_predict (const arma::mat &new_data) const
 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 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...
 

Private Attributes

implementationpimpl
 

Constructor & Destructor Documentation

gplib::gp_reg::gp_reg ( )

Constructor.

gplib::gp_reg::~gp_reg ( )

Destructor.

Member Function Documentation

mv_gauss gplib::gp_reg::full_predict ( const arma::mat &  new_data) const

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 matrix containing points for which output data is unknown.
shared_ptr< kernel_class > gplib::gp_reg::get_kernel ( ) const

Returns the current kernel set to be used during the regression process.

arma::vec gplib::gp_reg::predict ( const 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 matrix containing points for which output data is unknown.
void gplib::gp_reg::set_kernel ( const std::shared_ptr< kernel_class > &  k)

Sets the kernel to be used during the regression process.

Parameters
k: A kernel_class kernel.
void gplib::gp_reg::set_training_set ( const arma::mat &  X,
const arma::vec &  y 
)

Sets the training set to be used during the training process.

Parameters
X: Matrix of known inputs, each row represents one input.
y: Vector of known outputs corresponding to the known inputs.
double gplib::gp_reg::train ( int  max_iter,
double  tol 
)

Trains the model using the provided training set.

Parameters
max_iter: Maximum number of iterations.
tol: Relative tolerance on the optimization parameters.

Member Data Documentation

implementation* gplib::gp_reg::pimpl
private

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