34 setSurrogateModel(eng);
41 size_t nhp =
mGP[0].nHyperParameters();
44 kSampler->setNParticles(nParticles);
45 kSampler->setNBurnOut(100);
48 MCMCModel::~MCMCModel()
52 void MCMCModel::updateHyperParameters()
55 size_t last =
mGP.size()-1;
56 vectord lastTheta =
mGP[last].getHyperParameters();
58 FILE_LOG(logDEBUG) <<
"Initial kernel parameters: " << lastTheta;
59 kSampler->run(lastTheta);
60 for(
size_t i = 0; i<nParticles; ++i)
62 mGP[i].setHyperParameters(kSampler->getParticle(i));
64 FILE_LOG(logDEBUG) <<
"Final kernel parameters: " << lastTheta;
68 void MCMCModel::setSurrogateModel(randEngine& eng)
70 for(
size_t i = 0; i<nParticles; ++i)
77 void MCMCModel::setCriteria(randEngine& eng)
81 for(
size_t i = 0; i<nParticles; ++i)
84 mCrit[i].setRandomEngine(eng);
94 FILE_LOG(logERROR) <<
"Expected " <<
mCrit[i].nParameters()
95 <<
" parameters. Got " 98 FILE_LOG(logINFO) <<
"Using default parameters for criteria.";
Posterior distribution on GPs based on MCMC over kernel parameters.
Factory model for criterion functions This factory is based on the libgp library by Manuel Blum https...
static NonParametricProcess * create(size_t dim, Parameters parameters, const Dataset &data, MeanModel &mean, randEngine &eng)
Factory model generator for surrogate models.
Namespace of the library interface.
Parameters mParameters
Configuration parameters.
vectord crit_params
Criterion hyperparameters (if needed)
Criteria * create(std::string name, NonParametricProcess *proc)
Factory model for criterion functions This function is based on the libgp library by Manuel Blum http...
size_t mDims
Number of dimensions.
GPVect mGP
Pointer to surrogate model.
Markov Chain Monte Carlo sampler.
std::string crit_name
Name of the criterion.
Modules and helper macros for logging.
Dataset mData
Dataset (x-> inputs, y-> labels/output)
CritVect mCrit
Metacriteria model.
Bayesian optimization using different non-parametric processes as distributions over surrogate functi...