Commit 81b661ba authored by Federico Allocati's avatar Federico Allocati
Browse files

Changed loop again

parent c2ee7aa7
......@@ -57,13 +57,13 @@ namespace limbo {
{
_model = model_t(StateFunction::dim_in, StateFunction::dim_out);
this->_init(sfun, afun, reset);
if (!this->_observations.empty())
_model.compute(this->_samples, this->_observations, Params::boptimizer::noise(), this->_bl_samples);
acqui_optimizer_t acqui_optimizer;
while (this->_samples.size() == 0 || !this->_stop(*this, afun)) {
if (!this->_observations.empty())
_model.compute(this->_samples, this->_observations, Params::boptimizer::noise(), this->_bl_samples);
acquisition_function_t acqui(_model, this->_iteration);
Eigen::VectorXd starting_point = (Eigen::VectorXd::Random(StateFunction::dim_in).array() + 1) / 2;
......@@ -97,6 +97,9 @@ namespace limbo {
//this->_samples.back(), afun)
std::cout << " best:" << this->best_observation(afun) << std::endl;
if (!this->_observations.empty())
_model.compute(this->_samples, this->_observations, Params::boptimizer::noise(), this->_bl_samples);
this->_iteration++;
}
}
......
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