#ifndef BESTRESULTSEXCEL_H #define BESTRESULTSEXCEL_H #include #include #include #include "reports/ExcelFile.h" namespace platform { using json = nlohmann::ordered_json; class BestResultsExcel : public ExcelFile { public: BestResultsExcel(const std::string& path, const std::string& score, const std::vector& datasets); ~BestResultsExcel(); void reportAll(const std::vector& models, const json& table, const std::map>& ranks, bool friedman, double significance); void reportSingle(const std::string& model, const std::string& fileName); private: void build(); void header(bool ranks); void body(bool ranks); void footer(bool ranks); void formatColumns(); void doFriedman(); void addConditionalFormat(std::string formula); std::string path; std::string score; std::vector models; std::vector datasets; json table; std::map> ranksModels; bool friedman; double significance; int modelNameSize = 12; // Min size of the column int datasetNameSize = 25; // Min size of the column }; } #endif