v2#

Classes#

Analyzer#

class Analyzer : public ioh::logger::analyzer::v1::Analyzer#

New logger method: using csv and json files.

json file structure: ~ 1 file per problem: ~ every dimension is a struct with fields: {suite, fid, fname, dim, maximization, algid, alginfo, csv file name, *experiment attr., list of run attributes names, list of runs} ~ every run is struct with: {instance, neval, best point {e, y, x}, *run attributes} csv file: {runid, “function evaluation”, “current f(x)” “best-so-far f(x)” “current af(x)+b” “best af(x)+b”}

Public Functions

inline Analyzer(const Triggers &triggers = {trigger::on_improvement}, const Properties &additional_properties = {}, const fs::path &root = fs::current_path(), const std::string &folder_name = "ioh_data", const std::string &algorithm_name = "algorithm_name", const std::string &algorithm_info = "algorithm_info", const bool store_positions = false, const structures::Attributes &attributes = {})#

Logger formatting data in a format supported by iohprofiler.

Parameters:
  • triggers – When to fire a log event.

  • additional_properties – What to log.

  • root – Path in which to store the data.

  • folder_name – Name of folder in which to store data. Will be created as a subdirectory of root.

  • algorithm_name – The string separating fields.

  • algorithm_info – The string indicating a comment.

  • store_positions – Whether to store x positions in the logged data

  • attributes – See: analyzer::Attributes.

inline virtual ~Analyzer()#

Protected Functions

inline virtual void handle_last_eval() override#

Gets called when the current problem changes dimension.

inline virtual void close() override#

Writes all data to the info file.

Private Functions

inline std::vector<std::string> attribute_names() const#
inline virtual void handle_new_problem(const problem::MetaData &problem) override#

Gets called when a new problem is attached.

inline virtual void handle_new_dimension(const problem::MetaData &problem, const std::string &dat_path) override#

Gets called after the last evaluation of a run.

Private Members

std::map<std::string, structures::ExperimentInfo> experiments_#
std::string current_filename_#
bool closed = false#