SG++-Doxygen-Documentation
sgpp::datadriven::BOConfig Class Reference

Container class to store a conrete hyperparameter configuration for interaction with Bayesian Optimization. More...

#include <BOConfig.hpp>

Public Member Functions

 BOConfig ()=default
 Default Constructor. More...
 
 BOConfig (std::vector< int > *discOptions, std::vector< int > *catOptions, size_t nCont)
 Constructor for making a prototype based on the number of hyperparameters. More...
 
void calcDiscDistance (BOConfig &other, base::DataVector &scales)
 calculation of discrete part of the distance between two BOConfigs/sample points More...
 
int getCat (size_t idx)
 Get the value of a specific categorical parameter. More...
 
double getCont (size_t idx)
 Get the value of a specific continuous parameter. More...
 
size_t getContSize ()
 Get number of continuous parameters. More...
 
int getDisc (size_t idx)
 Get the value of a specific discrete parameter. More...
 
size_t getNPar () const
 Get number total number of parameters. More...
 
double getScaledDistance (BOConfig &other, const base::DataVector &scales)
 Compute complete distance to another BOConfig/sample point. More...
 
double getScore ()
 Get score measured on this sample. More...
 
double getTotalDistance (const base::DataVector &input, base::DataVector &scales)
 finish previous distance calculation by adding the continuous part More...
 
bool nextDisc ()
 Iterator over discrete parameter options. More...
 
void randomize (std::mt19937 &generator)
 Generate a random config. More...
 
void setCont (const base::DataVector &input)
 Set the continuous parameters according to input. More...
 
void setScore (double input)
 Set score measured on this sample. More...
 

Detailed Description

Container class to store a conrete hyperparameter configuration for interaction with Bayesian Optimization.

Constructor & Destructor Documentation

sgpp::datadriven::BOConfig::BOConfig ( )
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.

Parameters
discOptionsnumber of options for each discrete parameter
catOptionsnumber of options for each categorical parameter
nContnumber of continuous parameters

Member Function Documentation

void sgpp::datadriven::BOConfig::calcDiscDistance ( BOConfig other,
base::DataVector scales 
)

calculation of discrete part of the distance between two BOConfigs/sample points

Parameters
othersample point to calculate distance to
scalesscaling of hyperparameters in relation to each other

References python.statsfileInfo::i, and sgpp::combigrid::pow().

Referenced by sgpp::datadriven::BayesianOptimization::main().

int sgpp::datadriven::BOConfig::getCat ( size_t  idx)

Get the value of a specific categorical parameter.

Parameters
idxparameter position
Returns
parameter value

Referenced by sgpp::datadriven::FitterFactory::setBO().

double sgpp::datadriven::BOConfig::getCont ( size_t  idx)

Get the value of a specific continuous parameter.

Parameters
idxparameter position
Returns
parameter value

Referenced by sgpp::datadriven::FitterFactory::setBO().

size_t sgpp::datadriven::BOConfig::getContSize ( )

Get number of continuous parameters.

Returns
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.

Parameters
idxparameter position
Returns
parameter value

Referenced by sgpp::datadriven::FitterFactory::setBO().

size_t sgpp::datadriven::BOConfig::getNPar ( ) const

Get number total number of parameters.

Returns
number of continuous parameters
double sgpp::datadriven::BOConfig::getScaledDistance ( BOConfig other,
const base::DataVector scales 
)

Compute complete distance to another BOConfig/sample point.

Parameters
othersample point to calculate distance to
scalesscaling of hyperparameters in relation to each other
Returns
distance measure

References python.statsfileInfo::i, sgpp::combigrid::pow(), and analyse_erg::tmp.

double sgpp::datadriven::BOConfig::getScore ( )

Get score measured on this sample.

Returns
score

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

Parameters
inputcontinuous part of the other (new) sample point
scalesscaling of hyperparameters in relation to each other
Returns
complete distance measure

References python.statsfileInfo::i, sgpp::combigrid::pow(), and analyse_erg::tmp.

bool sgpp::datadriven::BOConfig::nextDisc ( )

Iterator over discrete parameter options.

Returns
stopping criterion

References python.statsfileInfo::i.

Referenced by sgpp::datadriven::BayesianOptimization::main().

void sgpp::datadriven::BOConfig::randomize ( std::mt19937 &  generator)

Generate a random config.

Parameters
generatorfor seeded rng

References python.statsfileInfo::i.

void sgpp::datadriven::BOConfig::setCont ( const base::DataVector input)

Set the continuous parameters according to input.

Parameters
inputDataVector holding continuous parameters

Referenced by sgpp::datadriven::BayesianOptimization::main().

void sgpp::datadriven::BOConfig::setScore ( double  input)

Set score measured on this sample.

Parameters
inputscore

Referenced by sgpp::datadriven::BoHyperparameterOptimizer::run().


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