#ifndef BESTRESULTS_H #define BESTRESULTS_H #include #include namespace platform { using json = nlohmann::ordered_json; class BestResults { public: explicit BestResults(const std::string& path, const std::string& score, const std::string& model, const std::string& dataset, bool friedman, double significance = 0.05) : path(path), score(score), model(model), dataset(dataset), friedman(friedman), significance(significance) { } std::string build(); void reportSingle(bool excel); void reportAll(bool excel); void buildAll(); private: std::vector getModels(); std::vector getDatasets(json table); std::vector loadResultFiles(); void messageExcelFile(const std::string& fileName); json buildTableResults(std::vector models); void printTableResults(std::vector models, json table); std::string bestResultFile(); json loadFile(const std::string& fileName); void listFile(); std::string path; std::string score; std::string model; std::string dataset; bool friedman; double significance; int maxModelName = 0; int maxDatasetName = 0; }; } #endif