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

concrete class for hyperparameter with discrete values More...

#include <DiscreteParameter.hpp>

Inheritance diagram for sgpp::datadriven::DiscreteParameter:
sgpp::datadriven::HyperParameter

Public Member Functions

 DiscreteParameter ()=default
 Default Constructor. More...
 
 DiscreteParameter (std::string &&name, int minv, int maxv)
 Normal constructor, number of bits calculated automatically. More...
 
 DiscreteParameter (int nBits, std::string &&name, int minv, int maxv)
 Constructor with custom number of bits. More...
 
int getNOptions ()
 Retrieve the number of options for this parameter. More...
 
int getValue ()
 Retrieve the current value of the hyperparameter. More...
 
void setBO (int option)
 adjust the current value of the hyperparameter according to the (normalized) input More...
 
void setHarmonica () override
 adjust the current value of the hyperparameter according to the bit configuration by harmonica More...
 
- Public Member Functions inherited from sgpp::datadriven::HyperParameter
 HyperParameter ()
 Default constructor for implicit use by data structures. More...
 
 HyperParameter (size_t nBits, std::string &name)
 Normal constructor. More...
 
void makeConfigBits (std::vector< ConfigurationBit * > &configBits)
 Connects parameter to bit representation in harmonica. More...
 
virtual ~HyperParameter ()=default
 Default Destructor. More...
 

Protected Attributes

int maxv
 maximum value of the hyperparameter during optimization More...
 
int minv
 minimum value of the hyperparameter during optimization More...
 
int value = 0
 current value of the hyperparameter More...
 
- Protected Attributes inherited from sgpp::datadriven::HyperParameter
std::vector< ConfigurationBitbits
 associated configuration bits for harmonica More...
 
std::string name
 name of the hyperparameter More...
 
size_t nBits
 number of bits for harmonica More...
 

Detailed Description

concrete class for hyperparameter with discrete values

Constructor & Destructor Documentation

sgpp::datadriven::DiscreteParameter::DiscreteParameter ( )
default

Default Constructor.

sgpp::datadriven::DiscreteParameter::DiscreteParameter ( std::string &&  name,
int  minv,
int  maxv 
)

Normal constructor, number of bits calculated automatically.

Parameters
namename of the hyperparameter
minvminimum value of the hyperparameter during optimization
maxvmaximum value of the hyperparameter during optimization

References python.statsfileInfo::i, and sgpp::datadriven::HyperParameter::nBits.

sgpp::datadriven::DiscreteParameter::DiscreteParameter ( int  nBits,
std::string &&  name,
int  minv,
int  maxv 
)
inline

Constructor with custom number of bits.

Parameters
nBitsnumber of bits for representation in harmonica
namename of the hyperparameter
minvminimum value of the hyperparameter during optimization
maxvmaximum value of the hyperparameter during optimization

References getNOptions(), getValue(), setBO(), and setHarmonica().

Member Function Documentation

int sgpp::datadriven::DiscreteParameter::getNOptions ( )

Retrieve the number of options for this parameter.

Returns

References maxv, and minv.

Referenced by DiscreteParameter().

int sgpp::datadriven::DiscreteParameter::getValue ( )

Retrieve the current value of the hyperparameter.

Returns
value of the hyperparameter

References value.

Referenced by DiscreteParameter().

void sgpp::datadriven::DiscreteParameter::setBO ( int  option)

adjust the current value of the hyperparameter according to the (normalized) input

Parameters
optionvalue of the parameter from 0

References minv, and value.

Referenced by DiscreteParameter().

void sgpp::datadriven::DiscreteParameter::setHarmonica ( )
overridevirtual

adjust the current value of the hyperparameter according to the bit configuration by harmonica

Implements sgpp::datadriven::HyperParameter.

References sgpp::datadriven::HyperParameter::bits, m, maxv, minv, and value.

Referenced by DiscreteParameter().

Member Data Documentation

int sgpp::datadriven::DiscreteParameter::maxv
protected

maximum value of the hyperparameter during optimization

Referenced by getNOptions(), and setHarmonica().

int sgpp::datadriven::DiscreteParameter::minv
protected

minimum value of the hyperparameter during optimization

Referenced by getNOptions(), setBO(), and setHarmonica().

int sgpp::datadriven::DiscreteParameter::value = 0
protected

current value of the hyperparameter

Referenced by getValue(), setBO(), and setHarmonica().


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