Fixes #278

parent 4b8ede53
......@@ -408,14 +408,31 @@ namespace limbo {
void set_log_loo_cv(double log_loo_cv) { _log_loo_cv = log_loo_cv; }
/// LLT matrix (from Cholesky decomposition)
//const Eigen::LLT<Eigen::MatrixXd>& llt() const { return _llt; }
const Eigen::MatrixXd& matrixL() const { return _matrixL; }
const Eigen::MatrixXd& alpha() const { return _alpha; }
/// return the list of samples that have been tested so far
/// return the list of samples
const std::vector<Eigen::VectorXd>& samples() const { return _samples; }
/// return the list of observations
std::vector<Eigen::VectorXd> observations() const
{
std::vector<Eigen::VectorXd> observations;
for (int i = 0; i < _observations.rows(); i++) {
observations.push_back(_observations.row(i));
}
return observations;
}
/// return the observations (in matrix form)
/// (NxD), where N is the number of points and D is the dimension output
const Eigen::MatrixXd& observations_matrix() const
{
return _observations;
}
bool inv_kernel_computed() { return _inv_kernel_updated; }
/// save the parameters and the data for the GP to the archive (text or binary)
......
......@@ -265,13 +265,32 @@ namespace limbo {
});
}
/// return the list of samples that have been tested so far
/// return the list of samples
const std::vector<Eigen::VectorXd>& samples() const
{
assert(_gp_models.size());
return _gp_models[0].samples();
}
/// return the list of observations
const std::vector<Eigen::VectorXd>& observations() const
{
return _observations;
}
/// return the observations (in matrix form)
/// (NxD), where N is the number of points and D is the dimension output
Eigen::MatrixXd observations_matrix() const
{
assert(_dim_out > 0);
Eigen::MatrixXd observations(_observations.size(), _dim_out);
for (int i = 0; i < _observations.size(); i++) {
observations.row(i) = _observations[i];
}
return observations;
}
/// return the mean observation
Eigen::VectorXd mean_observation() const
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment