26 #include <boost/numeric/ublas/matrix_proxy.hpp> 42 double evaluate(
const vectord &query)
44 return mBO->evaluateCriteria(query);
58 vectord lowerBound = zvectord(
mDims);
59 vectord upperBound = svectord(
mDims,1.0);
69 const vectord &upperBound)
77 FILE_LOG(logINFO) <<
"Bounds: ";
78 FILE_LOG(logINFO) << lowerBound;
79 FILE_LOG(logINFO) << upperBound;
90 randFloat drawSample(
mEngine,realUniformDist(0,1));
92 for(vectord::iterator x = Xnext.begin(); x != Xnext.end(); ++x)
101 double minf = cOptimizer->run(xOpt);
104 randNFloat drawSample(
mEngine,normalDist(0,0.001));
105 for(
size_t ii = 0;ii<5; ++ii)
108 for(
size_t j=0; j<xOpt.size(); ++j)
110 pert(j) += drawSample();
114 double minf2 = cOptimizer->localTrialAround(pert);
118 FILE_LOG(logDEBUG) <<
"Local beats Global";
122 catch(std::invalid_argument& e)
131 return mBB->unnormalizeVector(x);
vectord samplePoint()
Sample a single point in the input space.
void findOptimal(vectord &xOpt)
Call the inner optimization method to find the optimal point acording to the criteria.
vectord remapPoint(const vectord &x)
Remap the point x to the original space (e.g.
Namespace of the library interface.
Bayesian optimization for functions in continuous input spaces.
ContinuousModel()
Default constructor forbidden.
void generateInitialPoints(matrixd &xPoints)
Selects the initial set of points to build the surrogate model.
boost::mt19937 mEngine
Random number generator.
Parameters mParameters
Configuration parameters.
BayesOpt main C++ interface.
size_t mDims
Number of dimensions.
Latin Hypercube Sampling.
size_t n_inner_iterations
Maximum inner optimizer evaluations.
Defines a bounding box or axis-alligned bound constraints.
Abstract module for Bayesian optimization.
void setBoundingBox(const vectord &lowerBound, const vectord &upperBound)
Sets the bounding box.
void samplePoints(M &xPoints, int method, randEngine &mtRandom)
Selects the sampling method.
Boost types for random number generation.
virtual ~ContinuousModel()
Default destructor.
Global exploration, local refinement (hand tuned)
Module for box constrain management.
boost::scoped_ptr< utils::BoundingBox< vectord > > mBB
Bounding Box (input space limits)
size_t init_method
Sampling method for initial set 1-LHS, 2-Sobol (if available), other value-uniformly distributed...
C++ wrapper of the NLOPT library.
Modules and helper macros for logging.
vectord getPointAtMinimum()
Get optimal point in the inner space (e.g.