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

Concrete class for hyperparameter with continuous values. More...

#include <ContinuousParameter.hpp>

Inheritance diagram for sgpp::datadriven::ContinuousParameter:
sgpp::datadriven::HyperParameter

Public Member Functions

 ContinuousParameter ()=default
 Default constructor. More...
 
 ContinuousParameter (size_t nBits, std::string &&name, double minv, double maxv, bool logscale=false)
 Normal Constructor. More...
 
virtual double getValue ()
 Retrieve the current value of the hyperparameter. More...
 
void setBO (double interval)
 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

bool logscale = false
 whether the parameter is on a log-scale More...
 
double maxv
 maximum value of the hyperparameter during optimization More...
 
double minv
 minimum value of the hyperparameter during optimization More...
 
double 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 continuous values.

Constructor & Destructor Documentation

◆ ContinuousParameter() [1/2]

sgpp::datadriven::ContinuousParameter::ContinuousParameter ( )
default

Default constructor.

◆ ContinuousParameter() [2/2]

sgpp::datadriven::ContinuousParameter::ContinuousParameter ( size_t  nBits,
std::string &&  name,
double  minv,
double  maxv,
bool  logscale = false 
)
inline

Normal Constructor.

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
logscalewhether this parameter operates on a logscale

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

Member Function Documentation

◆ getValue()

double sgpp::datadriven::ContinuousParameter::getValue ( )
virtual

Retrieve the current value of the hyperparameter.

Returns
value of the hyperparameter

References logscale, sgpp::combigrid::pow(), and value.

Referenced by ContinuousParameter().

◆ setBO()

void sgpp::datadriven::ContinuousParameter::setBO ( double  interval)

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

Parameters
interval(normalized) value of the hyperparameter

References maxv, minv, and value.

Referenced by ContinuousParameter().

◆ setHarmonica()

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

Member Data Documentation

◆ logscale

bool sgpp::datadriven::ContinuousParameter::logscale = false
protected

whether the parameter is on a log-scale

Referenced by getValue().

◆ maxv

double sgpp::datadriven::ContinuousParameter::maxv
protected

maximum value of the hyperparameter during optimization

Referenced by setBO(), and setHarmonica().

◆ minv

double sgpp::datadriven::ContinuousParameter::minv
protected

minimum value of the hyperparameter during optimization

Referenced by setBO(), and setHarmonica().

◆ value

double sgpp::datadriven::ContinuousParameter::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: