25 #ifndef _EMPIRICALBAYES_HPP_ 26 #define _EMPIRICALBAYES_HPP_ 28 #include <boost/scoped_ptr.hpp> 39 class NLOPT_Optimization;
59 void updateHyperParameters();
60 void fitSurrogateModel();
61 void updateSurrogateModel();
63 double evaluateCriteria(
const vectord& query);
64 void updateCriteria(
const vectord& query);
66 bool criteriaRequiresComparison();
67 void setFirstCriterium();
68 bool setNextCriterium(
const vectord& prevResult);
69 std::string getBestCriteria(vectord& best);
76 void setSurrogateModel(randEngine& eng);
77 void setCriteria(randEngine& eng);
80 boost::scoped_ptr<NonParametricProcess>
mGP;
81 boost::scoped_ptr<Criteria>
mCrit;
83 boost::scoped_ptr<NLOPT_Optimization> kOptimizer;
88 inline void EmpiricalBayes::fitSurrogateModel()
89 {
mGP->fitSurrogateModel(); };
91 inline void EmpiricalBayes::updateSurrogateModel()
92 {
mGP->updateSurrogateModel(); };
94 inline double EmpiricalBayes::evaluateCriteria(
const vectord& query)
95 {
return (*
mCrit)(query); };
97 inline void EmpiricalBayes::updateCriteria(
const vectord& query)
98 {
return mCrit->update(query); };
100 inline bool EmpiricalBayes::criteriaRequiresComparison()
101 {
return mCrit->requireComparison(); };
103 inline void EmpiricalBayes::setFirstCriterium()
104 {
mCrit->initialCriteria(); };
106 inline bool EmpiricalBayes::setNextCriterium(
const vectord& prevResult)
108 mCrit->pushResult(prevResult);
109 return mCrit->rotateCriteria();
112 inline std::string EmpiricalBayes::getBestCriteria(vectord& best)
113 {
return mCrit->getBestCriteria(best); };
116 {
return mGP->prediction(query); };
Bayesian optimization using different non-parametric processes as distributions over surrogate functi...
virtual ~EmpiricalBayes()
Default destructor.
Namespace of the library interface.
Abstract interface for posterior model/criteria.
boost::scoped_ptr< NonParametricProcess > mGP
Pointer to surrogate model.
Abstract and factory modules for criteria.
boost::scoped_ptr< Criteria > mCrit
Metacriteria model.
Bayesian optimization using different non-parametric processes as distributions over surrogate functi...