OPTK  0.1.2
Toolkit for global optimisation algorithms
Public Member Functions | Private Attributes | List of all members
gp_opt Class Reference

#include <gp.hpp>

Inheritance diagram for gp_opt:
optk::optimiser

Public Member Functions

void update_search_space (sspace::sspace_t *space) override
 
inst::set generate_parameters (int param_id) override
 
void receive_trial_results (int param_id, inst::set params, double value) override
 
- Public Member Functions inherited from optk::optimiser
 optimiser (std::string name)
 
 ~optimiser ()
 
virtual void clear ()
 
std::string get_name ()
 
void accept (optimisers *o)
 

Private Attributes

uint n_iters
 
sspace::sspace_tm_space
 

Additional Inherited Members

- Protected Member Functions inherited from optk::optimiser
void add_to_trials (int param_id, inst::node *n)
 
- Protected Attributes inherited from optk::optimiser
std::unordered_map< int, inst::settrials
 

Detailed Description

gp_opt is a generic Gaussian process-based optimiser which is only implemented to provide a baseline against other methods.

Member Function Documentation

◆ generate_parameters()

inst::set gp_opt::generate_parameters ( int  param_id)
overridevirtual

This is the method invoked to generate the next trial's parameters for the benchmark or program being optimised.

Parameters
param_idAn identifier for this parameter trial; this may or may not be used by the optimistaion algorithm.
Returns
A pointer to an inst::node, or a NULL pointer if there are no more parameters to return.

Reimplemented from optk::optimiser.

◆ receive_trial_results()

void gp_opt::receive_trial_results ( int  param_id,
inst::set  params,
double  value 
)
overridevirtual

Allows the benchmark or program being optimised to communicate back the value of the cost function for a parameter set.

Parameters
param_idThis parameter id is used to identify the parameters used to generate the result.
parametersFor increased flexibility, the actual parameters used to generate the result are also copied back.
valueThe actual value of the objective function.

Reimplemented from optk::optimiser.

◆ update_search_space()

void gp_opt::update_search_space ( sspace::sspace_t space)
overridevirtual

The GP optimiser is only compatible with continuous valued inputs (for the moment); conceretely an error will be raised if the input is not pt::uniform, pt::loguniform, pt::normal, pt::lognormal. Currently all parameter types are treated as pt::uniform, although in the future information about parameters' distributions may be taken into account.

Parameters
spaceThe new search space.

Reimplemented from optk::optimiser.

Member Data Documentation

◆ m_space

sspace::sspace_t* gp_opt::m_space
private

A copy of the problem search space

◆ n_iters

uint gp_opt::n_iters
private

Counts the number of iterations performed


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