BayesOpt
BayesOpt

Main module for Bayesian optimization. More...

Classes

class  bayesopt::ContinuousModel
 Bayesian optimization for functions in continuous input spaces. More...
 
class  bayesopt::DiscreteModel
 Bayesian optimization for functions in discrete spaces. More...
 
class  bayesopt::BayesOptBase
 Abstract module for Bayesian optimization. More...
 
class  bayesopt::EmpiricalBayes
 Bayesian optimization using different non-parametric processes as distributions over surrogate functions. More...
 
class  bayesopt::PosteriorFixed
 Bayesian optimization using different non-parametric processes as distributions over surrogate functions. More...
 
class  bayesopt::PosteriorModel
 Bayesian optimization using different non-parametric processes as distributions over surrogate functions. More...
 

Typedefs

typedef double(* eval_func) (unsigned int n, const double *x, double *gradient, void *func_data)
 

Functions

BAYESOPT_API int bayes_optimization (int nDim, eval_func f, void *f_data, const double *lb, const double *ub, double *x, double *minf, bopt_params parameters)
 C wrapper for the Bayesian optimization algorithm. More...
 
BAYESOPT_API int bayes_optimization_disc (int nDim, eval_func f, void *f_data, double *valid_x, size_t n_points, double *x, double *minf, bopt_params parameters)
 C wrapper for the Bayesian optimization algorithm. More...
 
BAYESOPT_API int bayes_optimization_categorical (int nDim, eval_func f, void *f_data, int *categories, double *x, double *minf, bopt_params parameters)
 C wrapper for the Bayesian optimization algorithm. More...
 
static PosteriorModelbayesopt::PosteriorModel::create (size_t dim, Parameters params, randEngine &eng)
 
 bayesopt::PosteriorModel::PosteriorModel (size_t dim, Parameters params, randEngine &eng)
 Constructor. More...
 
virtual bayesopt::PosteriorModel::~PosteriorModel ()
 Default destructor.
 
virtual void bayesopt::PosteriorModel::updateHyperParameters ()=0
 
virtual void bayesopt::PosteriorModel::fitSurrogateModel ()=0
 
virtual void bayesopt::PosteriorModel::updateSurrogateModel ()=0
 
virtual double bayesopt::PosteriorModel::evaluateCriteria (const vectord &query)=0
 
virtual void bayesopt::PosteriorModel::updateCriteria (const vectord &query)=0
 
virtual bool bayesopt::PosteriorModel::criteriaRequiresComparison ()=0
 
virtual void bayesopt::PosteriorModel::setFirstCriterium ()=0
 
virtual bool bayesopt::PosteriorModel::setNextCriterium (const vectord &prevResult)=0
 
virtual std::string bayesopt::PosteriorModel::getBestCriteria (vectord &best)=0
 
void bayesopt::PosteriorModel::setSamples (const matrixd &x, const vectord &y)
 
void bayesopt::PosteriorModel::setSamples (const matrixd &x)
 
void bayesopt::PosteriorModel::setSamples (const vectord &y)
 
void bayesopt::PosteriorModel::setSample (const vectord &x, double y)
 
void bayesopt::PosteriorModel::addSample (const vectord &x, double y)
 
double bayesopt::PosteriorModel::getValueAtMinimum ()
 
vectord bayesopt::PosteriorModel::getPointAtMinimum ()
 
void bayesopt::PosteriorModel::plotDataset (TLogLevel level)
 
const Datasetbayesopt::PosteriorModel::getData ()
 
virtual ProbabilityDistributionbayesopt::PosteriorModel::getPrediction (const vectord &query)=0
 

Variables

Parameters bayesopt::PosteriorModel::mParameters
 Configuration parameters.
 
size_t bayesopt::PosteriorModel::mDims
 Number of dimensions.
 
Dataset bayesopt::PosteriorModel::mData
 Dataset (x-> inputs, y-> labels/output)
 
MeanModel bayesopt::PosteriorModel::mMean
 

Detailed Description

Main module for Bayesian optimization.

Function Documentation

◆ bayes_optimization()

BAYESOPT_API int bayes_optimization ( int  nDim,
eval_func  f,
void *  f_data,
const double *  lb,
const double *  ub,
double *  x,
double *  minf,
bopt_params  parameters 
)

C wrapper for the Bayesian optimization algorithm.

This function assumes continuous optimization.

Parameters
nDimnumber of input dimensions
fpointer to the function to optimize
f_datapointer to extra data to be used by f
lbarray of lower bounds
ubarray of upper bounds
xinput: initial query, output: result (minimum)
minfvalue of the function at the minimum
parametersparameters for the Bayesian optimization.
Returns
error code

Definition at line 98 of file bayesoptwpr.cpp.

◆ bayes_optimization_categorical()

BAYESOPT_API int bayes_optimization_categorical ( int  nDim,
eval_func  f,
void *  f_data,
int *  categories,
double *  x,
double *  minf,
bopt_params  parameters 
)

C wrapper for the Bayesian optimization algorithm.

This assumes the input variables are categories. Use of the Hamming kernel is highly recommended.

Parameters
nDimnumber of input dimensions
fpointer to the function to optimize
f_datapointer to extra data to be used by f
categoriesnumber of categories on each dimension
xinput: initial query, output: result (minimum)
minfvalue of the function at the minimum
parametersparameters for the Bayesian optimization.
Returns
error code

Definition at line 203 of file bayesoptwpr.cpp.

◆ bayes_optimization_disc()

BAYESOPT_API int bayes_optimization_disc ( int  nDim,
eval_func  f,
void *  f_data,
double *  valid_x,
size_t  n_points,
double *  x,
double *  minf,
bopt_params  parameters 
)

C wrapper for the Bayesian optimization algorithm.

This function assumes discrete optimization.

Parameters
nDimnumber of input dimensions
fpointer to the function to optimize
f_datapointer to extra data to be used by f
valid_xset of possible discrete points
n_pointsnumber of possible discrete points
xinput: initial query, output: result (minimum)
minfvalue of the function at the minimum
parametersparameters for the Bayesian optimization.
Returns
error code

Definition at line 143 of file bayesoptwpr.cpp.

Referenced by ExampleDisc::checkReachability().

◆ PosteriorModel()

bayesopt::PosteriorModel::PosteriorModel ( size_t  dim,
Parameters  params,
randEngine &  eng 
)

Constructor.

Parameters
paramsset of parameters (see parameters.hpp)

Definition at line 46 of file posteriormodel.cpp.