BayesOpt
ExampleHartmann6 Class Reference
+ Inheritance diagram for ExampleHartmann6:
+ Collaboration diagram for ExampleHartmann6:

Public Member Functions

 ExampleHartmann6 (bayesopt::Parameters par)
 
double evaluateSample (const vectord &xin)
 Function that defines the actual function to be optimized. More...
 
bool checkReachability (const vectord &query)
 This function checks if the query is valid or not. More...
 
double sqr (double x)
 
void printOptimal ()
 
- Public Member Functions inherited from bayesopt::ContinuousModel
 ContinuousModel (size_t dim, Parameters params)
 Constructor. More...
 
virtual ~ContinuousModel ()
 Default destructor.
 
void setBoundingBox (const vectord &lowerBound, const vectord &upperBound)
 Sets the bounding box. More...
 
- Public Member Functions inherited from bayesopt::BayesOptBase
 BayesOptBase (size_t dim, Parameters params)
 Constructor. More...
 
virtual ~BayesOptBase ()
 Default destructor.
 
void optimize (vectord &bestPoint)
 Execute the optimization process of the function defined in evaluateSample. More...
 
void stepOptimization ()
 Execute ONE step the optimization process of the function defined in evaluateSample.
 
void initializeOptimization ()
 Initialize the optimization process. More...
 
vectord getFinalResult ()
 Once the optimization has been perfomed, return the optimal point. More...
 
void saveOptimization (BOptState &state)
 Saves the current state of the optimization process into a state class. More...
 
void restoreOptimization (BOptState state)
 Restores the optimization process of a previous execution.
 
ProbabilityDistributiongetPrediction (const vectord &query)
 
const DatasetgetData ()
 
ParametersgetParameters ()
 
double getValueAtMinimum ()
 
size_t getCurrentIter ()
 
double evaluateCriteria (const vectord &query)
 

Private Attributes

matrixd mA
 
vectord mC
 
matrixd mP
 

Additional Inherited Members

- Protected Member Functions inherited from bayesopt::ContinuousModel
vectord samplePoint ()
 Sample a single point in the input space. More...
 
void findOptimal (vectord &xOpt)
 Call the inner optimization method to find the optimal point acording to the criteria. More...
 
vectord remapPoint (const vectord &x)
 Remap the point x to the original space (e.g. More...
 
void generateInitialPoints (matrixd &xPoints)
 Selects the initial set of points to build the surrogate model. More...
 
- Protected Member Functions inherited from bayesopt::BayesOptBase
vectord getPointAtMinimum ()
 Get optimal point in the inner space (e.g. More...
 
double evaluateSampleInternal (const vectord &query)
 Wrapper for the target function adding any preprocessing or constraint. More...
 
void plotStepData (size_t iteration, const vectord &xNext, double yNext)
 Print data for every step according to the verbose level. More...
 
void saveInitialSamples (matrixd xPoints)
 Eases the process of saving a state during initial samples.
 
void saveResponse (double yPoint, bool clear)
 
- Protected Attributes inherited from bayesopt::BayesOptBase
Parameters mParameters
 Configuration parameters.
 
size_t mDims
 Number of dimensions.
 
size_t mCurrentIter
 Current iteration number.
 
boost::mt19937 mEngine
 Random number generator.
 

Detailed Description

Definition at line 157 of file testfunctions.hpp.

Member Function Documentation

◆ checkReachability()

bool ExampleHartmann6::checkReachability ( const vectord &  query)
inlinevirtual

This function checks if the query is valid or not.

It can be used to introduce arbitrary constrains. Since the Gaussian process assumes smoothness, constrains are managed by the inner optimizer (e.g.:DIRECT), being highly time consuming. If the constrain is very tricky, DIRECT will need much more function evaluations.

Note: This function is experimental. Thus it is not made pure virtual. Using it is completely optional.

Parameters
querypoint to be evaluated.
Returns
boolean value showing if the the function is valid at the query point or not.

Reimplemented from bayesopt::BayesOptBase.

Definition at line 192 of file testfunctions.hpp.

References ExampleOneD::evaluateSample().

◆ evaluateSample()

double ExampleHartmann6::evaluateSample ( const vectord &  query)
inlinevirtual

Function that defines the actual function to be optimized.

This function must be modified (overriden) according to the specific problem.

Parameters
querypoint to be evaluated.
Returns
value of the function at the point evaluated.

Implements bayesopt::BayesOptBase.

Definition at line 176 of file testfunctions.hpp.


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