![]() |
SG++-Doxygen-Documentation
|
Container class to store a conrete hyperparameter configuration for interaction with Bayesian Optimization. More...
#include <BOConfig.hpp>
Public Member Functions | |
BOConfig ()=default | |
Default Constructor. | |
BOConfig (std::vector< int > *discOptions, std::vector< int > *catOptions, size_t nCont) | |
Constructor for making a prototype based on the number of hyperparameters. | |
void | calcDiscDistance (BOConfig &other, base::DataVector &scales) |
calculation of discrete part of the distance between two BOConfigs/sample points | |
int | getCat (size_t idx) |
Get the value of a specific categorical parameter. | |
double | getCont (size_t idx) |
Get the value of a specific continuous parameter. | |
size_t | getContSize () |
Get number of continuous parameters. | |
int | getDisc (size_t idx) |
Get the value of a specific discrete parameter. | |
size_t | getNPar () const |
Get number total number of parameters. | |
double | getScaledDistance (BOConfig &other, const base::DataVector &scales) |
Compute complete distance to another BOConfig/sample point. | |
double | getScore () |
Get score measured on this sample. | |
double | getTotalDistance (const base::DataVector &input, base::DataVector &scales) |
finish previous distance calculation by adding the continuous part | |
bool | nextDisc () |
Iterator over discrete parameter options. | |
void | randomize (std::mt19937 &generator) |
Generate a random config. | |
void | setCont (const base::DataVector &input) |
Set the continuous parameters according to input. | |
void | setScore (double input) |
Set score measured on this sample. | |
Container class to store a conrete hyperparameter configuration for interaction with Bayesian Optimization.
|
default |
Default Constructor.
sgpp::datadriven::BOConfig::BOConfig | ( | std::vector< int > * | discOptions, |
std::vector< int > * | catOptions, | ||
size_t | nCont | ||
) |
Constructor for making a prototype based on the number of hyperparameters.
discOptions | number of options for each discrete parameter |
catOptions | number of options for each categorical parameter |
nCont | number of continuous parameters |
void sgpp::datadriven::BOConfig::calcDiscDistance | ( | BOConfig & | other, |
base::DataVector & | scales | ||
) |
calculation of discrete part of the distance between two BOConfigs/sample points
other | sample point to calculate distance to |
scales | scaling of hyperparameters in relation to each other |
Referenced by sgpp::datadriven::BayesianOptimization::main().
int sgpp::datadriven::BOConfig::getCat | ( | size_t | idx | ) |
Get the value of a specific categorical parameter.
idx | parameter position |
Referenced by sgpp::datadriven::FitterFactory::setBO().
double sgpp::datadriven::BOConfig::getCont | ( | size_t | idx | ) |
Get the value of a specific continuous parameter.
idx | parameter position |
Referenced by sgpp::datadriven::FitterFactory::setBO().
size_t sgpp::datadriven::BOConfig::getContSize | ( | ) |
Get number of continuous parameters.
Referenced by sgpp::datadriven::BayesianOptimization::main().
int sgpp::datadriven::BOConfig::getDisc | ( | size_t | idx | ) |
Get the value of a specific discrete parameter.
idx | parameter position |
Referenced by sgpp::datadriven::FitterFactory::setBO().
size_t sgpp::datadriven::BOConfig::getNPar | ( | ) | const |
Get number total number of parameters.
double sgpp::datadriven::BOConfig::getScaledDistance | ( | BOConfig & | other, |
const base::DataVector & | scales | ||
) |
Compute complete distance to another BOConfig/sample point.
other | sample point to calculate distance to |
scales | scaling of hyperparameters in relation to each other |
double sgpp::datadriven::BOConfig::getScore | ( | ) |
Get score measured on this sample.
Referenced by sgpp::datadriven::BayesianOptimization::updateGP().
double sgpp::datadriven::BOConfig::getTotalDistance | ( | const base::DataVector & | input, |
base::DataVector & | scales | ||
) |
finish previous distance calculation by adding the continuous part
input | continuous part of the other (new) sample point |
scales | scaling of hyperparameters in relation to each other |
bool sgpp::datadriven::BOConfig::nextDisc | ( | ) |
Iterator over discrete parameter options.
Referenced by sgpp::datadriven::BayesianOptimization::main().
void sgpp::datadriven::BOConfig::randomize | ( | std::mt19937 & | generator | ) |
Generate a random config.
generator | for seeded rng |
void sgpp::datadriven::BOConfig::setCont | ( | const base::DataVector & | input | ) |
Set the continuous parameters according to input.
input | DataVector holding continuous parameters |
Referenced by sgpp::datadriven::BayesianOptimization::main().
void sgpp::datadriven::BOConfig::setScore | ( | double | input | ) |
Set score measured on this sample.
input | score |
Referenced by sgpp::datadriven::BoHyperparameterOptimizer::run().