Template Class ecdf¶
Defined in File ecdf.hpp
Inheritance Relationships¶
Base Type¶
public ioh::logger::observer< T >(Template Class observer)
Class Documentation¶
-
template<class
T>
classioh::logger::ecdf: public ioh::logger::observer<T>¶ An observer which stores bi-dimensional error/evaluations discretized attainment matrices.
A matrix is stored for each triplet (problem,dimension,instance), everything being identified by its index. Attainment matrices are boolean 2D tables, in which a 1 indicates that an error target (row index) have been attained at an evaluation target (column index).
The whole set of matrices can be accessed by the
getaccessor. A single one can be accessed by theataccessor. Ranges can be get back by*_rangeaccessors, which give access to the correspondingmin&&maxfunctions (Example:
using Logger = ecdf<BBOB_suite::Input_type>; BBOB_suite bench({1,2},{1,2},{2,10}); Logger logger(0,4e7,0, 0,100,20); BBOB_suite::Problem_ptr pb; while(pb = bench.get_next_problem()) { logger.target_problem(*pb); // Make a `sol` for(size_t i=0; i<100; ++i) { // 100 evaluations double f = pb->evaluate(sol); logger.write_line(pb->loggerInfo()); } } std::clog << logger.at(1,2,2) << std::endl;
- See
range).
Unnamed Group
-
void
activate_logger()¶ Not used, but part of the interface.
Observer interface
-
void
do_log(const std::vector<double> &infos) override¶ Actually store information about the last evaluation.
Should be called right after problem::evaluate, passing problem::loggerInfo().
Unnamed Group
-
const attain_suite &
data()¶ Accessors Access all the data computed by this observer.
-
const attain_mat &
at(size_t problem_id, size_t instance_id, size_t dim_id) const¶ Access a single attainment matrix.
First index: problem id, second index: instance id, third index: dimension id.
- Note
Use the same indices order than problem.
-
std::tuple<size_t, size_t, size_t>
size()¶ Returns the size of the computed data, in its internal order.
First index: number of problems, second index: number of dimensions, third index: number of instances.
- Note
: the order of the indices is not the one used by logger interface!
Unnamed Group
-
void
reset()¶ Clear all previously computed data structure.
Internal methods
-
attain_mat &
current_ecdf()¶ Returns the current attainment matrix.
-
void
fill_up(size_t i_error, size_t j_evals)¶ Fill up the upper/upper quadrant of the attainment matrix with ones.
Take care of not losing time overwriting existing quadrants.
Unnamed Group
-
attain_mat
_empty¶ An attainment matrix filled with zeros, copied for each new problem/instance/dim.
-
attain_suite
_ecdf_suite¶ The whole main data structure.
Public Types
Public Functions
-
ecdf(const double error_min, const double error_max, const size_t error_buckets, const size_t evals_min, const size_t evals_max, const size_t evals_buckets)¶ Simple constructor that defaults to log-log scale.
-
struct
Problem¶ Internal types Keep essential metadata about the problem.