PaGMO
1.1.5
|
Racing mechanism for algorithms. More...
#include <race_algo.h>
Public Member Functions | |
race_algo (const std::vector< algorithm::base_ptr > &algos=std::vector< algorithm::base_ptr >(), const problem::base &prob=problem::ackley(), unsigned int pop_size=100, unsigned int seed=0) | |
Constructor of the racing mechanism for algorithms. More... | |
race_algo (const std::vector< algorithm::base_ptr > &algos, const std::vector< problem::base_ptr > &prob, unsigned int pop_size=100, unsigned int seed=0) | |
Constructor of the racing mechanism for algorithms. More... | |
std::pair< std::vector< unsigned int >, unsigned int > | run (const unsigned int n_final, const unsigned int min_trials, const unsigned int max_count, double delta, const std::vector< unsigned int > &, const bool race_best, const bool screen_output) |
Juice of racing mechanisms for algorithms. More... | |
Racing mechanism for algorithms.
This class allows the racing of a set of algorithms on a problem or a set of problems. It supports the racing over single objective box-constrained and equality / inequality constrained problems.
Definition at line 46 of file race_algo.h.
pagmo::util::racing::race_algo::race_algo | ( | const std::vector< algorithm::base_ptr > & | algos = std::vector<algorithm::base_ptr>() , |
const problem::base & | prob = problem::ackley() , |
||
unsigned int | pop_size = 100 , |
||
unsigned int | seed = 0 |
||
) |
Constructor of the racing mechanism for algorithms.
Construct for a single problem
[in] | algos | The set of algorithms to be raced |
[in] | prob | The problem to be considered |
[in] | pop_size | The size of the population that the algorithms will be evolving |
[in] | seed | Seed to be used in racing mechanisms |
Definition at line 269 of file race_algo.cpp.
pagmo::util::racing::race_algo::race_algo | ( | const std::vector< algorithm::base_ptr > & | algos, |
const std::vector< problem::base_ptr > & | probs, | ||
unsigned int | pop_size = 100 , |
||
unsigned int | seed = 0 |
||
) |
Constructor of the racing mechanism for algorithms.
Construct for a set of problems
[in] | algos | The set of algorithms to be raced |
[in] | probs | The set of problems to be considered |
[in] | pop_size | The size of the population that the algorithms will be evolving |
[in] | seed | Seed to be used in racing mechanisms |
Definition at line 286 of file race_algo.cpp.
std::pair< std::vector< unsigned int >, unsigned int > pagmo::util::racing::race_algo::run | ( | const unsigned int | n_final, |
const unsigned int | min_trials, | ||
const unsigned int | max_count, | ||
double | delta, | ||
const std::vector< unsigned int > & | active_set, | ||
const bool | race_best, | ||
const bool | screen_output | ||
) |
Juice of racing mechanisms for algorithms.
The interface of race_algo mirrors race_pop.
[in] | n_final | Desired number of winners. |
[in] | min_trials | Minimum number of trials to be executed before dropping algorithms. |
[in] | max_count | Maximum number of objective function evaluation before the race ends. |
[in] | delta | Confidence level for statistical testing. |
[in] | active_set | Indices of individuals that should participate in the race. If empty, race on the whole algorithm set. |
[in] | race_best | Whetn true extracts the best, otherwise the worst algorithm. |
[in] | screen_output | Whether to log racing status on the console output. |
NOTE: The race of algorithms is in essence very similar to the race of individuals. A direct re-implementation of the racing routines for algorithms will cause unnecessary code duplication. To avoid that, internally, here the task of race_algo is reformulated into its ``dual form" in pop_race. The results of race_algo is then reconstructed from the results of pop_race. If Hoeffding race or Bernstein race is desired, they can be implemented in racing.cpp and be invoked in race_pop.cpp. This way, all the existing / to-be-implemented racing mechanisms can be shared by both race_pop and race_algo.
Definition at line 310 of file race_algo.cpp.