Commit 5755523d authored by Konstantinos Chatzilygeroudis's avatar Konstantinos Chatzilygeroudis
Browse files

Add possibility to ignore full kernel computation in gp

parent 94f35633
......@@ -77,7 +77,7 @@ namespace limbo {
/// Compute the GP from samples, observation, noise. This call needs to be explicit!
void compute(const std::vector<Eigen::VectorXd>& samples,
const std::vector<Eigen::VectorXd>& observations,
const Eigen::VectorXd& noises)
const Eigen::VectorXd& noises, bool compute_kernel = true)
{
assert(samples.size() != 0);
assert(observations.size() != 0);
......@@ -100,7 +100,8 @@ namespace limbo {
_noises = noises;
this->_compute_obs_mean();
this->_compute_full_kernel();
if (compute_kernel)
this->_compute_full_kernel();
}
/// Do not forget to call this if you use hyper-prameters optimization!!
......
......@@ -118,7 +118,7 @@ int main(int argc, char** argv)
GP2_t gp_ard(1, 1);
// do not forget to call the optimization!
gp_ard.compute(samples, observations, noises);
gp_ard.compute(samples, observations, noises, false);
gp_ard.optimize_hyperparams();
// write the predicted data in a file (e.g. to be plotted)
......
Supports Markdown
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